The <modbus_read> block allows you to read ModBus/TCP remote inputs.
Refer to the pymodbus module documentation for more details.
•« client_id » : This is the identifier for the connection to the remote I/O module; it must come from a <modbus_conn> block. The default value is None (type NoneType)
•« #slave » : This is the ModBus slave number. The default value is 1 (type int)
•« #function » : This is the ModBus function number. This number can be 1, 2, 3, or 4. The default value is 3 (type int); this corresponds to reading multiple “holding registers.”
•« offset » : This is the memory offset in the table provided by the ModBus slave.
•« count » : This is the number of elements to read from the ModBus slave.
•« value » : This is a value or a list corresponding to the state of the remote inputs that were read.
•« status » : This is the read status; it is equal to the requested function if the read operation was successful, otherwise it is the error code provided by the pymodbus module.
This block uses the Modbus/TCP connection identifier, which is generated by the <modbus_conn> block.
See also the <modbus_write> block if you wish to set Modbus/TCP remote outputs.