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
Hello , recently found a bug about register offset and modbus error codes.
Register Offset(u8regsize) is a uint8_t variable, you cannot exceed address range 255.
When ever you try to read a address(uint16_t) out of the this range , address is down casted to uint8_t and compared to table size in order to decide whether read address is exceeded this range.
Example case:
Register Table size 250.
Intended register read adress is 2000.
In that case we expect an EXC_ADDR_RANGE error code but we got successfull reading.
Modbus Frames decomposition
But if we want to read register at offset 509.
Modbus Frames decomposition
The text was updated successfully, but these errors were encountered:
Hello , recently found a bug about register offset and modbus error codes.
Register Offset(u8regsize) is a uint8_t variable, you cannot exceed address range 255.
When ever you try to read a address(uint16_t) out of the this range , address is down casted to uint8_t and compared to table size in order to decide whether read address is exceeded this range.
Example case:
Register Table size 250.
Intended register read adress is 2000.
In that case we expect an EXC_ADDR_RANGE error code but we got successfull reading.
Modbus Frames decomposition
But if we want to read register at offset 509.
Modbus Frames decomposition
The text was updated successfully, but these errors were encountered: