Logic Machine Forum
register bits sum modbus - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10)
+--- Thread: register bits sum modbus (/showthread.php?tid=3597)



register bits sum modbus - AndresMezaAyala - 29.09.2021

Hello,
I have two registers 71 and 72, in which I must obtain the information of the energy value
the two registers make a total of 32 bits:

as examples we have:

   Register             Data
Register 71 ------0111101293921029
Register 72 ------0129213123232323

I have to divide those bits to do an operation, as follows

  0           1111 0129         392 1029 0129 2131 2323 2323
sign               E                                     M


How can I separate the data in that way to be able to do a mathematical operation with them?


RE: register bits sum modbus - admin - 30.09.2021

You can simply create a profile and set the datatype field to float32. You can also use Read test to check the correctness beforehand. Use the same float32 data type and try setting Read swap to None if the value is incorrect. If it still does not work then try reading from the register 70 instead of 71.