Hello FactoryIO Community! I have searched both on this forum, YouTube and checked codesys/factoryio documents, I don’t find anything that answer my question so now I will ask here in hope that someone could take some time and help me out.
I don’t have a problem to communicate with the BOOL input/outputs via Codesys bulilt-in Modbus TCP, but how do I communicate with values like INT and REAL?
I use the Slave Modbus TCP device.
Is there really nobody on this forum that knows the answer? This is really frustrating and stops me from doing many of the scenes.
When using Modbus, Factory I/O scales Float sensor 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 Float and Int data types correspond to Real and DInt in Codesys.
You can find additional information here: Modbus TCP/IP Client - FACTORY I/O