You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check how the device manufacturer implemented it, and reconstruct the 32bit word at your application level from the UINT16 which i believe is the highest bits Modbus supports.
Manufacturer will define how they send data such as signed values, or others. Though for your case you stick the two parts together and reinterpret as 32bit.
I would not do the bit fiddling by hand, it's already in the libmodbus, have 3.1.6, but am sure it's since longer time there.
I'm waiting a bit for modbus_get_uint32_abcd(), modbus_get_uint32_dcba(), modbus_get_uint32_cdab(), and the like, similar to float. But to be honest, I never got my hands on a real device which needs the MSB/LSB flipping.
Hi,
I tried to read a 32 bit word and, as I imagined, it gave me a wrong value.
Is there a way to read 32 bit unsigned integers?
Thanks.
The text was updated successfully, but these errors were encountered: