How Can We Help?
How can 2 HMIs communicate via a Modbus-TCP Ethernet connection?
For HMI with Ethernet connection (HM-050BS, HM-070MW, HM-102BW, HM-156QS)
This tutorial explain how to connect 2 HMIs via the Modbus-TCP Ethernet protocol. This may be useful for adding other HMI screens to provide multiple viewing and control points.
First HMI, Modbus-TCP Server (Slave)
Communication settings, with an unique IP address and a value for IP gateway (any value on the same range (192.168.123.x) if gateway doesn’t exist)
Add the 502 port (port used by Modbus-TCP)
As Slave (Server) Modbus-TCP, the IP is not used. You receive only reading/writing request from the Master (Client)
Add a numerical input with internal address LW0 for example
Add a bit switch with internal address LB0 for example
You get this
Second HMI, Modbus-TCP Client (Master)
Communication settings, with an unique IP address and a value for IP gateway (any value on the same range (192.168.123.x) if gateway doesn’t exist)
Add the 502 port (port used by Modbus-TCP)
Add the IP of the Slave (Server) Modbus-TCP HMI
Add a numerical input with internal address LW100 for example
Add a bit switch with internal address LB100 for example
Add a Data Forward for read the values in Slave HMI and copy them to the Master HMI’s internal memory
Note
In this example, if you use the same HMI registers in both HMIs, you can use almost the same project for both
Physically connect HMIs
You can use a hub to connect HMIs over Ethernet with RJ45 cables, or connect them directly to each other with straight or crossed RJ45 cables.
Now you can change the bit or value on any HMIs
Tips
You can add this “Function Button” to access Ethernet settings.