What Word Order Is
Word order defines the arrangement of 16-bit words within a 32-bit or 64-bit Modbus value. When a data type spans multiple holding registers or input registers, the order in which the high and low words are transmitted determines how the value is reconstructed.
Word Order Variants
| Name | Register Layout (32-bit) | Example: 123456 as UINT32 |
|---|---|---|
| Big-endian (AB CD) | High word first, low word second | Reg N = 0x0001, Reg N+1 = 0xE240 |
| Little-endian (CD AB) | Low word first, high word second | Reg N = 0xE240, Reg N+1 = 0x0001 |
Word Order vs Byte Order
Word order and byte order are independent. A device can use big-endian word order with little-endian byte order within each word, resulting in four possible combinations for 32-bit values.
[!WARNING] Most field issues labeled as “bad data” or “wrong scaling” are actually word order or byte order mismatches. Always validate with a known-good engineering value.
How to Determine Word Order
- Read a register pair for a value you can verify physically (e.g., a temperature reading)
- Decode the raw bytes in both word orders
- The order that produces the correct engineering value is the device’s word order
See Modbus Data Types & Byte Order Reference for a complete walkthrough.