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
Every block unit length must be 2 bytes, is this part of protocol or just convention for this project. If I have a UINT (4 bytes) value, I have to split it to 2 WORD and then store it in two block units (if not, struct.pack would failed when reading), when reading this value I have concat these two WORD and this is not so convient.
The text was updated successfully, but these errors were encountered:
In Modbus, Holding Registers and Input Registers are 16-bit (2 bytes) per register. This is a protocol convention. It is very common for 32-bit data to be stored in 2 registers, for example floating point or as you mentioned UINT32. There is no standard on which register goes first when decoding, which is why software like modscan32 allows you to select between MSR and LSR. It is a limitation of the protocol, but I guess something you get used to when working with modbus.
modbus-tk/modbus_tk/modbus.py
Line 500 in 14c70f2
Every block unit length must be 2 bytes, is this part of protocol or just convention for this project. If I have a UINT (4 bytes) value, I have to split it to 2 WORD and then store it in two block units (if not,
struct.pack
would failed when reading), when reading this value I have concat these two WORD and this is not so convient.The text was updated successfully, but these errors were encountered: