Automation Glossary • Choose Modbus float word order

How to Choose Modbus Word Order: ABCD to DCBA

Merobix Engineering • • 6 min read

Your SCADA driver offers a dropdown labeled ABCD, BADC, CDAB, DCBA, or something like Big-Endian and Big-Endian Byte Swap, and you have to pick one for a 32-bit value. The labels are cryptic and the vendor datasheet may describe the format in yet another vocabulary. This guide decodes what those four codes actually mean at the byte level, maps them onto the swap settings your driver exposes, and gives a deterministic way to choose the right one instead of guessing. It is the reference you keep open while configuring floats and long integers.

Back to Blog

Choose Modbus float word order in one line: The four labels describe how a device orders the four bytes of a 32-bit value: ABCD is straight big-endian, DCBA is straight little-endian, BADC swaps the bytes within each word, and CDAB swaps the two words. Choose by matching the label to the swap controls your driver exposes - no swap for ABCD, byte swap for BADC, word swap for CDAB, both swaps for DCBA - then confirm against a known reference value before trusting it.

Decode What A, B, C, and D Mean

A 32-bit value has four bytes. Label them by significance: A is the most significant byte, then B, then C, then D the least significant. In the device's native form these carry the sign, exponent, and fraction of an IEEE-754 float, or the four bytes of a long integer. The four-letter code names the order in which those four bytes travel across the two Modbus registers, reading register-one-high-byte, register-one-low-byte, register-two-high-byte, register-two-low-byte. So ABCD means the bytes arrive in natural most-to-least significant order, and any other code is a rearrangement of that.

This vocabulary sits on top of the register-pairing concept: two sixteen-bit registers holding four bytes, described in general under Modbus register byte order and endianness. The four-letter code is just a compact way of writing which physical byte lands in which of the four slots. Once you can expand ABCD into byte one is A, byte two is B, and so on, the other three codes stop being magic strings and become simple permutations you can reason about.

Map Each Code to a Swap Setting

Drivers rarely let you type ABCD directly; they expose byte swap and word swap toggles, and you translate. The mapping is fixed.

CodeCommon nameWord swapByte swap
ABCDBig-endianOffOff
BADCBig-endian byte swapOffOn
CDABLittle-endian word swapOnOff
DCBALittle-endianOnOn

Keep this table beside the driver dialog. If your tool names its choices ABCD through DCBA directly, pick the letters. If it exposes swap toggles, use the two right-hand columns. If it uses Big-Endian and Little-Endian with byte-swap variants, the middle column translates. The one thing to avoid is assuming Big-Endian alone is safe - CDAB and DCBA are extremely common in industrial devices, so the default rarely wins.

The same four codes apply to 32-bit integers, and the swap logic is identical - the integer walkthrough lives under a Modbus swapped 32-bit integer word order. What differs is how obvious a wrong choice looks: a wrong word order in a float produces an absurd magnitude, while a wrong order in an integer produces a merely large or negative total that can slip past a casual glance. That is a reason to be more disciplined about verifying integers than floats.

Choose From the Datasheet When It States a Format

Many datasheets name the format explicitly, and reading it correctly saves the trial-and-error. Phrases like Float ABCD, IEEE-754 big-endian, or high word first all mean ABCD, no swaps. Little-endian, low word first, or Float CDAB tell you to set word swap. A device documented as byte-swapped or Modicon-style may want byte swap on. When the datasheet is explicit, choose the matching code directly and skip the guessing - the register-map reading discipline that surfaces this detail is covered under a Modbus register map address table.

The catch is that datasheet vocabulary is inconsistent between vendors, and some say only float without stating the order at all. When the document is silent or ambiguous, do not assume - fall back to the reference-value method below. Treat any format phrase you are not certain about as a hypothesis to confirm rather than a fact to trust, because a confidently wrong reading of the datasheet feels exactly like a correct one until the number comes out absurd.

Confirm the Choice Against a Reference

Whichever code you pick, prove it before you rely on it. Set the tag to your chosen order and compare its decoded value to a truth: the device's own display, a calibrated input, or a physically obvious quantity. If it matches, you are done; if not, the four-code table above is also your search order - step through ABCD, BADC, CDAB, DCBA until the value is right, then record which code that device uses so the next engineer does not repeat the search.

For a value that changes, watch it track a real process movement rather than checking a single static number, because one frozen reading can coincidentally match under the wrong order. When the tag rises and falls with the actual flow or pressure in sensible units, the order is confirmed. This verification step is the same one that closes out the broader endianness fix under fixing a Modbus wrong register value, and it is what separates a chosen order from a proven one.

Frequently Asked Questions

What do ABCD, BADC, CDAB, and DCBA mean in Modbus?

They name the byte order of a 32-bit value across two registers, where A is the most significant byte and D the least. ABCD is straight big-endian, DCBA is straight little-endian, BADC swaps the bytes within each word, and CDAB swaps the two words. Your driver's byte-swap and word-swap toggles map directly onto these four codes, so the code tells you exactly which toggles to set.

Which Modbus word order is most common?

There is no universal default; both big-endian ABCD and word-swapped CDAB are widespread, and DCBA appears on many little-endian devices. Because vendors disagree, you cannot assume the driver default is right. Read the datasheet if it states a format, and otherwise step through the four codes against a known reference value until the decoded number matches, then record which order that device uses.

Is Modbus big-endian or little-endian?

The Modbus protocol transmits each register most-significant byte first, which is big-endian at the register level. But the protocol does not define how a device orders the two registers of a 32-bit value, so word order is vendor-specific. That gap is why the four codes exist: the byte order within a register is fixed by the protocol, while the word order across registers is a device choice you must configure.

Sources and verification

This page references the protocol specifications published by the organizations below. Editions, product capabilities, and documentation change over time - confirm current requirements and specifications directly with the source.

Merobix is not affiliated with, endorsed by, or sponsored by these organizations; their names are used only to identify the standards and products discussed.

More in Industrial Protocols
Fix Modbus float endianness  •  Modbus swapped 32-bit integer  •  32-Bit Float Across Two Modbus Registers  •  Register Byte Order (Endianness)  •  Add a Modbus node to a live bus  •  All Industrial Protocols →
Free SCADA operator training
Merobix University - 70 video lessons & 261 quiz questions, from first login to compliance reporting. No demo call required.
Start free →