UY-103 · Workshop
Modbus toolkit: RTU CRC16 and float byte-order decoder
CRC16 for RTU frames and float decoding in every byte order.
CRC16 for an RTU frame
- CRC (low byte first)
- C5 CD
- Full frame
- 01 03 00 00 00 0A C5 CD
- Function
- 3 · Read Holding Registers
Encode a value to registers
Decode two registers to Float32 / Int32
| Order | Float32 | Int32 | UInt32 |
|---|---|---|---|
| ABCD | 12.56000 | 1095300547 | 1095300547 |
| CDAB | -4.950302e+32 | -171753144 | 4123214152 |
| BADC | 198415.8 | 1212269557 | 1212269557 |
| DCBA | -490.5645 | -1007335359 | 3287631937 |
Modbus RTU CRC16: polynomial 0xA001, initial value 0xFFFF, low byte sent first.
A Float32 spans two registers and every vendor orders them differently: ABCD (big-endian), CDAB (word swap, very common), BADC, DCBA. If a reading looks wrong, compare all four orders here.
FAQ
How do I compute the CRC of a Modbus RTU frame?
Paste the frame bytes in hex without the CRC; the tool computes it with polynomial 0xA001 and shows it in transmit order (low byte first).
I read two registers and got a nonsense number. Why?
Usually the word order differs from what you expected. Enter both register values and compare ABCD, CDAB, BADC and DCBA; the sensible value is the right order.
What is the difference between holding and input registers?
Holding registers are read/write (functions 03, 06, 16); input registers are read-only (function 04) and usually carry measurements.