Technical building blocks
gtbmodbus-lab
Modbus Register Lab
Decode and encode Modbus registers — numeric types, byte order, scaling and active bits.
- float32
- int16
- endianness
- bitfield
Registers read
decimal or hexadecimal · 0 to 65535
decimal or hexadecimal · 0 to 65535
16-bit words
Register 1
0x41CC
- UINT16
- 16,844
- INT16
- 16,844
15 0
14 1
13 0
12 0
11 0
10 0
9 0
8 1
7 1
6 1
5 0
4 0
3 1
2 1
1 0
0 0
active bits : 2, 3, 6, 7, 8, 14
Register 2
0x0000
- UINT16
- 0
- INT16
- 0
15 0
14 0
13 0
12 0
11 0
10 0
9 0
8 0
7 0
6 0
5 0
4 0
3 0
2 0
1 0
0 0
active bits : none
32-bit interpretations
result = raw value × factor + offset
Each row tests a different byte order. Spot the value that makes sense for the expected quantity: for a temperature, 25.5 is for instance far more plausible than a number in the billions. The matching row and column give the order and type to configure in the BMS.
| Order | FLOAT32 | INT32 | UINT32 |
|---|---|---|---|
| ABCD | 25.5 | 1.10389e+9 | 1.10389e+9 |
| BADC | -50,593,792 | -868,155,392 | 3.42681e+9 |
| CDAB | 2.36035e-41 | 16,844 | 16,844 |
| DCBA | 7.32725e-41 | 52,289 | 52,289 |