This Modbus register decoder joins two 16-bit registers into one 32-bit value in each byte order. 41A4 0000 read as ABCD is the float 20.5; the row that gives a sensible number is the order your device uses.
Each register (16 bits)
| Register | Hex | Unsigned (uint16) | Signed (int16) |
|---|---|---|---|
Registers 1 and 2 as one 32-bit value
| Byte order | uint32 | int32 | float32 |
|---|---|---|---|
| ABCDBig-endian: high word first | – | – | – |
| CDABWord swap: low word first | – | – | – |
| BADCByte swap in each word | – | – | – |
| DCBALittle-endian: both swapped | – | – | – |
Enter a second register to see 32-bit values.
Enter one to eight registers as hexadecimal numbers of up to four digits, for example 41A4 0000.
How it works
How do you decode a float from two Modbus registers?
A Modbus register holds 16 bits. A 32-bit value, such as a float or a long counter, spans two registers. Call the bytes of the first register A and B and those of the second C and D.
Devices disagree on the order: ABCD is the standard big-endian order, CDAB swaps the two words, BADC swaps the bytes inside each word, and DCBA reverses all four. The row that gives a sensible value is the order your device uses.
float32 is the IEEE 754 single-precision format. 41A4 0000 in ABCD is 20.5.
In Hermetry Gateways read Modbus devices for you and bring each one into Hermetry as its own device: Devices behind a gateway.
Glossary Modbus register, Modbus RTU, Modbus TCP
Questions
Questions about the Modbus register decoder
Why does my float look wrong?
Almost always the byte order. Try the four rows: the one that gives a sensible number, such as 20.5 instead of 4.7 × 10⁻⁴¹, is the order your device uses.
How many registers does a 32-bit value take?
Two. A 64-bit value (a double or a long energy counter) takes four.
More tools

