Your Modbus communication is working — you're getting responses, no exceptions, no timeouts. But the values make no sense. Voltage reads as 2.84×10⁻²⁹ instead of 236.4V. Power shows 1.23×10³⁸ instead of 150kW. This is almost always a byte order (endianness) problem.
Why This Happens
A Modbus register is 16 bits (2 bytes). But a FLOAT32 (IEEE 754) value needs 32 bits — two consecutive registers. The Modbus specification says each 16-bit register is big-endian (high byte first). But it says nothing about how to order the two registers relative to each other. So manufacturers choose their own convention.
The same 4 bytes — say 0x43 0x6C 0xC2 0x8F — produce completely different float values depending on the order you read them:
If your value looks like a wild exponential number (10²⁰, 10⁻³⁰, etc.) but you expected something mundane like 236.4V, the byte order is wrong. The bytes are correct, the interpretation is wrong.
The 4 Byte Orders Explained
ABCD — Big Endian (Modbus standard)
Register 1 contains the high word (AB), Register 2 contains the low word (CD). This is the "natural" Modbus order and is used by ABB, many Schneider devices, and most devices that claim "Modbus compliant".
CDAB — Big Endian Word Swap
Register 1 contains the low word (CD), Register 2 contains the high word (AB). Each word's internal byte order is still big-endian, but the words are swapped. This is very common — Siemens and some older Schneider devices use this.
BADC — Little Endian Byte Swap
Register 1 contains the high word but with bytes swapped (BA), Register 2 contains the low word with bytes swapped (DC). Less common but found in some niche devices.
DCBA — Little Endian
Everything reversed. Register 1 = DC, Register 2 = BA. Found in some devices that store data in native Intel byte order.
How to Identify the Correct Byte Order
Read a value you can verify physically (voltage with a multimeter is ideal). Read the raw register values in hex. Then try all 4 interpretations using our Modbus Number Converter — one of them will give you the expected value.
Common Device Byte Orders
- ABB REF/REX 6xx relays — ABCD (Big Endian)
- ABB M4M / EV3 meters — ABCD (Big Endian)
- Schneider PM5xxx — ABCD (Big Endian)
- Siemens PAC3200 — CDAB (Word Swap)
- Janitza UMG series — ABCD (Big Endian)
- Socomec Diris — CDAB (Word Swap)
Fix It in Your Code
Once you know the byte order, configure your Modbus master to use it. In Ignition, this is set per device in the Modbus driver configuration. In PLCnext Structured Text, you'll need to swap the word order manually after reading the raw registers:
Compare all four byte order interpretations side-by-side
ModBus Pro shows ABCD, CDAB, BADC, and DCBA interpretations simultaneously for any register value. No more guessing — just pick the one that matches your expected reading. The Converter tool on this site also lets you test all 4 orders instantly.
Download Free