User Tools

Site Tools


master

Serial Master

The Serial Master mode is used to connect one serial port alternately to one of many IP ports. The IP ports are entered as a table consisting of the protocol to be used for that connection, an RTU ID, and an IP address:port. There is also a secondary mode of operation used to broadcast to all IP ports.

Serial Master

During operation a modbus master request is read by the serial master port). The RTU ID is extracted from the message and used as an index into the table. The protocol to be used, Modbus via TCP, Mobbus via UDP, or Modbus TCP, is obtained from the indexed row in the table. The master request is translated into the indexed format and the resultant message is written to the indexed address:port modbus IP slave using the indexed protocol. The response is read from the IP slave and then written to the serial master port.

If there is only one entry in the IP table then the RTU ID from the serial port inbound message is not used. Instead, the message is output to that one IP address and port.

If the RTU ID in the master request message is not in the table then the message is output to the serial destination port. This port can be disabled if no such output is needed. If there is only one entry in the table then this feature cannot be enabled since the RTU ID in this case is ignored and all messages go to that single IP address and port.

The dst port can be muxed with IP mux and serial mux slave ports.

In the secondary mode of operation, enabled by selecting TCP Broadcast or UDP Broadcast from the drop-down list. The RTU ID, Protocol, and Dst Port are not used. Any message received on the Src Port is broadcast to all IP ports. On receipt of a message from any IP port the message is returned on the Src Port and a wait on a new source port message occurs. If no message is received from an IP port then the transaction times out after 5 seconds and a new one starts. Up to 8 of the 50 IP ports in the table can be enabled in broadcast mode.

The configuration parameters are:

Src Port Master port used as the source of modbus requests. Serial port number in the range 0 to 4.
Dst Port Unknown RTU ID destination port. Serial port number in the range 0 to 4. Must be enabled with checkbox if output is required.
Broadcast  Select None, TCP, or UDP broadcast mode.
Default IP Port  Broadcast port default value. Select with spinner and click the Set button to set all IP Port values in the table. Only used if Broadcast is enabled.
RTU ID If the incoming message has this RTU identifier then the message will be output to this IP address and port.
Protocol Type of modbus and transport method to use.
IP Address IP address of the port to connect to. Must be x.x.x.x where each x is in the range 0 to 255.
IP Port IP port number. It is best to use 1024 and above since lower numbers are well-known ports.

Example: Serial Master and Three Slaves

In this example one serial master is connected to three modbus slaves. The first modbus slave is an RTU that has an IP port. The other two modbus slaves have serial ports and are therefore connected to two other IP100s that act as terminal servers to provide IP interfaces. IP100 A is configured to operate as a serial master, IP100 B and IP100 C are configured to operate as virtual serial servers.

 Serial Master and Three Slaves

master.txt · Last modified: 2023/08/29 13:58 by