User Tools

Site Tools



Modbus TCP

As of v2.62, the ComfileHMI editor now supports Modbus TCP running as either a client (master) or as a server (slave).

Using the ComfileHMI as a Modbus TCP Client (Master)

There are many ways to configure a TCP/IP network, but the image above illustrates a typical scenario when the ComfileHMI is operating as a Modbus TCP client (master). Each Modbus TCP server (slave) will be assigned a unique IP address. In the diagram above the Moacon and the Modbus TCP gateway are both operating as Modbus TCP servers. However, behind the Modbus TCP gateway, there are two individually addressable PLCs: The CUBLOC/MSB and the Modport.

In the ComfileHMI Editor's Project Properties, each channel corresponds to an individual Modbus TCP server, and each channel can have one or more PLCs. For the configuration above, the configuration may look like the image below.

Once configured, you can address the PLCs just as you would any other PLC in the ComfileHMI editor.

Using the ComfileHMI as a Modbus TCP Server (Slave)

To use the ComfileHMI as a Modbus TCP server (slave), enable the Modbus TCP server in the ComfileHMI Editor's Project Properties.

The HMI device's IP address and other network settings can be configured from the ComfileHMI's Runtime Configuration.

When operating as a Modbus TCP server (slave), only the ComfileHMI's internal memory is addressable. Modbus address 0 corresponds to internal memory address 0, Modbus address 1 corresponds to internal memory address 1, etc. in a 1-to-1 mapping for the entire address range. Only 16-bit Modbus functions (e.g. Register reading and writing) are supported. If the user stores a value larger than 16-bits to the internal memory location, only the least significant 16-bits will be read from or written to through the Modbus TCP server.

comfilehmi/hmi_connection_modbus_tcp/index.txt · Last modified: 2018/12/21 18:16 by COMFILE Technology