TCP Port-based Routing

Port-based routing is only available for routing requests from (and replies to) Modbus TCP Masters.

Port-based routing rules are edited on the port-based routing settings page (tab) . With port-based routing, you can enable up to four listening ports on the Modbus Gateway and specify the destination for each listening port (with possible ID shifting if necessary).

The destination Modbus Slave for each listening port can be:

• One of the four available serial ports (channels).

• One of the four Modbus TCP Slaves on the IP network. A dedicated page (tab) — TCP Slave Settings — allows you to set the IP address and port for each of the four Modbus TCP Slaves.

For example, you may specify that...

• Requests to port 502 should be routed to the serial port 1;

• Requests to port 503 should be routed to the TCP Slave 2.

routing-by-tcp-port

Note that TCP port-based routing has higher priority than the slave ID-based routing . Meaning, if both routing methods are engaged and produce conflicting routing results, then port-based routing takes precedence.