How to poll a Modbus TCP Slave device with two Modbus TCP Master devices if one of them does not support this mode?

Some Modbus TCP Slave devices do not support operation with two TCP Masters. In this case, for polling Modbus TCP Slave with two TCP Masters an MGate with two Ethernet ports is required, for example, MGate MB3170/3270 or MGate MB3660.

Some Modbus TCP Slave devices do not support operation with two TCP Masters. In this case, for polling Modbus TCP Slave with two TCP Masters an MGate with two Ethernet ports is required, for example, MGate MB3170/3270 or MGate MB3660.

In this setting example, for device emulation the ModScan32/64 utility is used.

Scheme:

PC1 is set as a TCP Master device using Modscan (192.168.127.200) ——— Ethernet ——— MGate 3170 (192.168.127.100) ——— Ethernet ——— PC 2 is set as a TCP Slave device using Modsim (192.168.127.1)

Programs of 2 Modscans are launched on PC1 (as there are two TCP Masters). MGate IP address is specified as a Remote modbusTCP Server.
On PC2 Modsim program is launched. The port from which MGate commands arrive is specified.

1. TCP Master configuration:

In the polling program, specify the IP address and the port for connection to MGate gateway.

2. MGate MB3170 or MGate MB3660 gateway configuration:

In MGate Manage, choose Modbus Routing – Slave ID Table, then press Add and enter the IP address and the port of the slave device.


For MGate 3660 the setting steps are the same, however, you need to choose Transparent mode.


3. Configuration of TCP Slave:

Commands come from port 502, let’s open it

Equipment: MGate MB3170/3270, MGate MB3660.