Working with Modbus TCP Devices
The filters for Modbus over TCP communication are located in the System :: Modbus TCP
To communicate with a ModbusTCP device, first a connection needs to be established. The ModbusTCP_Connect filter should be used for establishing the connection. The default port for ModbusTCP protocol is 502. Usually, a connection is created before the application enters its main loop and it remains valid through multiple iterations of the process. It becomes invalid when it is explicitly closed using ModbusTCP_Close filter or when an I/O error occurs. The Modbus filters work on the same socket as TCP IP filters. If Modbus device supports Keep-Alive mechanism it is recommended to enable it, to increase chance of detecting a broken connection. For more details please read Using TCP/IP Communication.
Reading and Writing Values
Adaptive Vision Studio provides set of filters to manage Modbus objects. The following is table of object types provided by a modbus:
The Coils, Inputs and Registers in ModbusTCP protocol are addressed starting at zero. The table below lists filters to control object types mentioned above.
The following example illustrates how to use ModbusTCP filters.
To support device specific function Adaptive Vision Studio provides ModbusTCP_SendBuffer filter. This filter allows to create a custom Modbus frame.
|Previous: Working with National Instruments Devices||Next: Project Files|