FDC PC-E Protocol Converter

Gateway & Transparent Data Links

Modes 0, 1 and 2

                 

The PC-E Ethernet/Serial Converter can be configured to operate in a number of different modes depending on the application; for additional detail refer to Section 2 Operating Modes in the PC-E manual.

Each mode allows the PC-E to be configured as a Transparent data link or it can perform the Gateway function of converting Ethernet Modbus TCP messages to Serial Modbus RTU messages and visa versa.

  • Transparent Data Link: Serial [ASCII or Modbus} data sent to the PC-E is encapsulated into an Ethernet packet & sent out on the Ethernet network while data received in an Ethernet packet is removed and sent out its’ serial port; there is no protocol conversion to Modbus RTU or Modbus TCP.
  • Gateway Data Link: Serial Modbus data sent to the PC-E is converted to Ethernet Modbus TCP and data received via Ethernet Modbus TCP is converted and sent out the serial port as Modbus RTU.

Mode 0, 1 and 2 are described below

Mode 0

Mode 0 is the standard server configuration for most Ethernet/serial converter applications. This mode has been designed to service multiple sockets, which enables up to 4 masters to communicate with the slaves connected to the converter.

Each socket is serviced in turn, and any message in the socket is sent out on the serial port. The converter then starts a timer waiting for a reply. When a reply is received the messages is put into the initiating socket and send out on the Ethernet network. The converter then checks the next socket. If no reply is received then the timer expires and the converter checks the next socket. This timer is configured on the ip.htm web page and is labeled” Serial Reply Timeout”.

The converter can also accept messages on UDP instead of TCP. Operation is the same and does not need any special configuration.

There are a number of different configurations for this mode (Mode 0) as follows:

Modbus gateway – Using TCP

When used as a Modbus gateway the client must be configured to use Port 502. This is a reserved port number for Modbus TCP applications and informs the converter that it must implement the protocol conversion from Modbus TCP on the Ethernet network to Modbus RTU on the serial network.

Transparent Mode – Using TCP

When used in transparent mode the client must be configured to use Port 1234. This port number informs the converter that any data that is received in a socket must be transmitted out the serial port without any protocol conversion.

Modbus gateway – Using UDP

When used as a Modbus gateway the client must be configured to use Port 502. This is a reserved port number for Modbus TCP applications and informs the converter that it must implement the protocol conversion from Modbus TCP on the Ethernet network to Modbus RTU on the serial network.

Transparent Mode – Using UDP

When used in transparent mode the client must be configured to use Port 1234. This port number informs the converter that any data that is received in a UDP datagram must be transmitted out the serial port without any protocol conversion.

Mode 1 graphic below: Maximum of 4 masters can access data of the IO modules via PC-E.  That means Mode 0 supports multi socket communications.

Sample System

 

 

Mode 1

Mode 1 is a server configuration and is similar to Mode 0 except that this mode only makes use of a single socket. By default, Mode 1 for simple applications with one Master.
Example: Access IO modules data in one PC via PC-E on Ethernet.

This single socket implementation waits for messages to come in on the Ethernet network and sends them out the serial port. Any messages being received on the serial port are sent out on the Ethernet network. As there is only one socket, there is no need for the timer as in mode 0.

There are a number of different configurations for this mode as follows:

Modbus gateway – Using TCP

When used as a Modbus gateway the client must be configured to use Port 502. This is a reserved port number for Modbus TCP applications and informs the converter that it must implement the protocol conversion from Modbus TCP on the Ethernet network to Modbus RTU on the serial network.

Transparent Mode – Using TCP

When used in transparent mode the client must be configured to use a PORT number chosen by the user. This port number informs the converter that any data that is received in a socket must be transmitted out the serial port without any protocol conversion and must not be one of the reserved numbers 21 (ftp), 80 (http), 502 (Modbus). This is the mode that is used to create a transparent point-to-point serial-Ethernet-serial link with a client converter.

 

Mode 2

Mode 2 is a Client configuration and is used to make a transparent link with a server converter. This mode only makes use of a single socket.

This single socket implementation waits for messages to come in on the Ethernet network and sends them out the serial port. Any messages being received on the serial port are sent out on the Ethernet network. As there is only one socket, there is no need for the timer as in mode 0.

When messages are received on the serial port they are sent out on the Ethernet network. Due to the fact that the Ethernet network is normally faster than the serial data being received, the serial message being received will get broken up into small blocks and then sent on the Ethernet network. This could result in the Ethernet network being flooded with many messages sending one or two characters at a time. To prevent this from happening, a timer is used. This timer starts when the first character is received on the serial port and when it expires any received characters in the serial port buffer are sent out on the Ethernet network. This timer is disabled if a value of 0 is programmed. The timer is labeled “Char Timeout “on the ip.htm web page.

The client converter must be configured to use a PORT number chosen by the user. This port number must be the same which is programmed into the server converter. This Port number informs the converter that any data that is received in a socket must be transmitted out the serial port without any protocol conversion and must not be one of the reserved numbers 21 (ftp), 80 (http), 502 (Modbus). This is the mode that is used to create a transparent point-to-point serial-Ethernet-serial link with a server converter.

The Client converter has to open the socket with the Server converter. In order to do this, the IP address of the Server must be configured in the Client converter. This is done on the ip.htm web page and is labeled “Server IP”.

Join Our Mailing List
Email:

Return to:

FDC-PC-E_Gateway.html

PC-E Overview Description.html

FDC-PC-E_Operating_Modes.html

Main Products Page.htm

Future Design Controls   888.751.5444 csr@futuredesigncontrols.com