This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

register bits sum modbus
#1
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?
Reply
#2
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.
Reply


Forum Jump: