Factory IO MODBUS CODESYS

Hello @dilukamdp

To get Float and Int types, you can use either Holding Registers or Input Registers.
You just have to be aware that you must use a scale factor to correctly communicate the values. This is described in the documentation page about the Modbus driver in the Scale field, available here: Modbus TCP/IP Client - FACTORY I/O.

Note that when using Modbus, Factory I/O scales Float values by 100, converts it to an integer, and sends it in a Word. In Codesys you have to convert this Word to a Real and divide it by 100 to get the correct value. Note that Factory I/O’s Float and Int data types correspond to Real and DInt in Codesys.

In Codesys you have to map the variables using the Holding Registers and the Input Registers. just like you did to the discrete I/Os.

I hope this helps