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.

Modbus read upper/lower word
#1
Hi,

I have a modbus power meter and i don't know how to read 2 modbus registers into one bus address?
The manual says address 26 is the upper word and 27 is the lower, is there any way to "combine" them to one?

Thank you in advance

Attached Files Thumbnail(s)
   
Reply
#2
Are you using profile or scripts? For profiles you have to set datatype field to "uint32", otherwise use mb:readregistervalue(0x1A, "uint32", "w"). You might also need to adjust read_swap parameter. Start with reading the value from RTU read test in modbus tab.
Reply
#3
Thank you admin, it worked with read_swap set to 'n' althought on the web interface of the device i get a decimal number on the lm i only get the integer part, but i guess that has to do with the device and not the profile because register 0x1B is always 0
Reply


Forum Jump: