Modbus Data Types & Byte Order Reference

How to handle 32-bit floats, byte order (endianness), multi-register values, and scaling factors in Modbus integrations. Includes a device byte-order lookup table.

Categories:

Overview

After register addressing, byte order (endianness) is the second most common source of Modbus integration errors. When combining two 16-bit Modbus registers into a 32-bit float or integer value, the byte arrangement must match between the source device and the gateway. A mismatch produces garbled data — zeros, negative numbers, or nonsensical exponent values.

This article covers byte order conventions, data type handling, scaling factors, and a device-specific lookup table for common equipment.

Modbus Byte Order (Endianness) — 32-bit Float Example

Modbus Register Data Types

Every Modbus register is 16 bits (2 bytes). Larger values require combining multiple registers.

Single-Register Types (16-Bit)

These types fit in one register — no byte order concerns.

Data TypeRangeExample ValueTypical Use
UINT16 (unsigned integer)0 to 65,5354096 = fan speed RPMStatus codes, raw sensor counts, enumerated states
INT16 (signed integer)-32,768 to 32,767-120 = -12.0°C (with ÷10 scaling)Temperatures, pressures, bipolar analog signals
Boolean / Bit0 or 11 = alarm activeCoils and discrete inputs (FC01, FC02)

Multi-Register Types (32-Bit)

These require two registers — byte order is critical. See Byte Order below.

Data TypeRangeExample ValueTypical Use
UINT32 (unsigned 32-bit integer)0 to 4,294,967,2951,200,000 = energy kWh totalizerCounters, totalizers, accumulated runtime hours
INT32 (signed 32-bit integer)-2,147,483,648 to 2,147,483,647-500,000 = reverse power flow in wattsBidirectional power, differential pressure
Float32 (IEEE 754 single-precision)±1.18 × 10⁻³⁸ to ±3.40 × 10³⁸ (~7 significant digits)72.5 = temperature °F; 101.325 = pressure kPaMost analog values: temperature, humidity, voltage, current, power

[!NOTE] Float32 is the most common multi-register type in building automation. If a device datasheet lists analog values (temperatures, pressures, power), assume Float32 unless stated otherwise.

Float32 examples in practice:

Raw Hex (2 registers)Float32 ValueWhat It Represents
0x4291_000072.5Room temperature (°F)
0x42CA_0000101.0Barometric pressure (kPa)
0x447A_00001000.0Power consumption (W)
0x0000_00000.0Zero reading — or possibly wrong byte order
0xFF7F_FFFFNaNInvalid / sensor fault

Extended Types (64-Bit and Beyond)

These are rare in building automation but do appear on some devices.

Data TypeRegistersRangeTypical Use
Float64 (IEEE 754 double-precision)4±5.0 × 10⁻³²⁴ to ±1.8 × 10³⁰⁸ (~15 significant digits)High-precision scientific instruments, energy totalizers
48-bit integer30 to 281,474,976,710,655Flow meter totalization (see Multi-Register Values)

[!WARNING] Some device documentation uses “double” to mean two 16-bit registers (32-bit total), not IEEE 754 double-precision (64-bit). Always confirm whether “double” means 32-bit or 64-bit at project intake.

Byte Order (Endianness) for 32-Bit Values

When two 16-bit Modbus registers form a 32-bit value, four byte arrangements are possible. Given bytes a (MSB), b, c, d (LSB):

OrderNotationDescriptionCommon Names
ABCDBig-EndianHigh word first, high byte firstStandard, IBM, “normal”
CDABWord-SwapLow word first, high byte within each wordMid-Big, sw
BADCByte-SwapHigh word first, bytes reversed within each wordMid-Little, sb
DCBALittle-EndianEverything reversedIntel, “reversed”

ABCD (Big-Endian) is the most common convention, but enough devices use other orders that you should never assume — always verify.

How to Identify the Correct Byte Order

  1. Check the manufacturer datasheet for byte order or endianness specification
  2. Read a known value — if a temperature sensor reads 72°F on the display, read the raw registers and test each byte order until the converted value matches
  3. Test systematically — try ABCD first, then CDAB, BADC, DCBA. Most real devices use either ABCD or CDAB

[!TIP] If 32-bit float reads return zeros, negative numbers, or values like 1.73e-38, the byte order is almost certainly wrong. Try word-swap (CDAB) first — it’s the most common non-standard order. See the Modbus Troubleshooting Guide for a full diagnostic walkthrough.

QuickServer Byte Order Flags

When configuring a QuickServer gateway, use these format flags to control byte order conversion:

Configuration SyntaxByte OrderWhen to Use
2.i16-1.floatABCD (Big-Endian)Default; most devices
2.i16-1.float-swCDAB (Word-Swap)GE meters, many industrial devices
2.i16-1.float-sbBADC (Byte-Swap)Less common; test if sw doesn’t work
2.i16-1.float-sDCBA (Little-Endian)Rare; full reversal

Known Device Byte Orders

This table documents byte order requirements confirmed through real-world integrations:

ManufacturerDeviceProtocolByte OrderScalingNotes
GEEPM6000 Power MeterModbus RTUCDAB (word-swap)÷100Most common non-standard order
EatonForeseerModbus TCPABCD (Big-Endian)Standard order
Thermo FisherAquaSensors AV38Modbus RTUWord-order reversalIEEE754 float; verify with scanner
CORDEXCXC HP ControllersModbus TCPCDAB (word-swap)Initially deployed as big-endian; corrected
SchneiderSE5000 Power MetersModbus RTUFloat32 (ABCD)Dual memory arrays needed for multi-protocol
YorkQuantum Q4 ChillerModbus RTUStandard÷10Temperature values require scaling
MitsubishiFX5 PLCModbus TCPInteger only÷10No native float; pre-scaled integers

[!TIP] Don’t see your device? Use the systematic test method above. Once confirmed, document the result for future projects.

Scaling Factors

Some devices store values as scaled integers rather than floating-point numbers. The raw register value must be divided (or multiplied) by a scaling factor to get the real-world value:

PatternExampleDevices
÷10Raw 725 → 72.5°FYork Quantum Q4 chillers, Mitsubishi FX5 PLCs
÷100Raw 7250 → 72.50°FGE EPM6000 power meters
÷1000Raw 72500 → 72.500High-precision sensors

Always check the register map for scaling notes. If register values are consistently 10× or 100× the expected value, a scaling factor is likely missing from your configuration. For register addressing fundamentals, see Modbus Addressing & Register Reference.

Multi-Register Values (Beyond 32-Bit)

Most Modbus values use 1 or 2 registers. Occasionally, devices use 3 or more registers for a single data point:

48-Bit Integers (3 Registers)

Some flow meters use three 16-bit registers (MSW → LSW) for totalization counters. QuickServer gateways cannot natively combine 3 registers into a single value.

Workaround options:

  • Pass the three raw register values separately and combine them in the downstream system
  • Use a custom script or middleware to perform the combination

64-Bit Doubles (4 Registers)

Rare in building automation. If a device datasheet specifies 64-bit doubles, confirm with the manufacturer — many devices that claim “double” actually use 32-bit floats occupying 2 registers.

Troubleshooting

For detailed symptom-based diagnostics, see the Modbus Troubleshooting Guide. Quick reference for data type issues:

  • Data reads as zeros → byte order mismatch (try CDAB), register offset, or data type mismatch (reading integer as float)
  • Data reads as negative or exponent values → wrong byte order, signed-vs-unsigned confusion, or missing scaling factor
  • Correct on device display but wrong in BACnet → verify with a Modbus scanner first to isolate Modbus side vs. BACnet conversion

Configuration Intake Questions

Add these to your standard Modbus intake checklist to prevent byte-order rework:

#QuestionImpact
1What is the byte order for 32-bit values? (Big-endian, word-swap, byte-swap, little-endian, unknown)Prevents the #2 most common integration error
2Are there any known scaling factors? (÷10, ÷100, ÷1000)Prevents “data values are wrong” callbacks
3Do 32-bit values use floating-point or integer format?Prevents data type mismatch
4Does the manufacturer documentation specify register pair byte order?Gets definitive answer vs. trial-and-error

Chipkin Tools

  • QuickServer — Protocol gateway with built-in byte order conversion flags (-sw, -sb, -s)
  • QuickServer — Next-generation protocol conversion gateway
  • CAS Modbus Scanner — Read raw register values to verify byte order before building configurations
  • Chipkin support — Expert help with byte order diagnosis and configuration

Need more help?

If this page does not resolve the issue, contact Chipkin support with the product model, protocol details, and any diagnostics you have already captured.

Open Chipkin Support