The <modbus_conn> block attempts to establish a TCP connection with a ModBus/TCP remote I/O module, unless the connection is already established or “close” is true.
See the pymodbus module documentation for more details.
•« @ip » : This is the IP address of the remote I/O module. The default value is ‘127.0.0.1’ (type str)
•« port » : This is the port number on the remote I/O module side. The default value is 502 (type int)
•« timeout » : This is the maximum response time for the remote I/O module; if exceeded, an error will be raised when the <modbus_read> and <modbus_write> blocks are executed. The default value is 0.2 seconds (type float)
•« close » : Closes the connection if true. The default value is false
•« client_id » : This is the connection identifier; it must be used as an input for the <modbus_read> and <modbus_write> blocks.
•« connected » : This is the connection status; it is true if the connection is established.
This block enables the use of the <modbus_read> and <modbus_write> blocks, which facilitate communication between the target and the remote ModBus/TCP input/output modules.