Easy Modbus · plain-English Modbus reference

Why is my Modbus address off by one?

Short answer

Because the same register is legitimately called four different things. 40001, 4x00001, “holding register 1” and “address 0” all refer to the identical slot in the identical device. The number that actually travels in the Modbus packet is the last one, counting from zero; most vendor documentation uses one of the first three, counting from one. If your value is one register out — you asked for the supply temperature and got the return temperature — this is almost always why.

The four ways to write one address

Written asCalledCounts fromWhat goes on the wire
40001Modicon five-digit10
4x00001Prefixed, explicit10
“Holding register 1”One-based register number10
“Address 0”Protocol address00

The leading digit in the first two forms is not part of the number — it says which of the four lists the value is in:

PrefixListExample
0Coils00001 or 0x00001
1Discrete inputs10001 or 1x00001
3Input registers30001 or 3x00001
4Holding registers40001 or 4x00001

A trap for programmers. In Modbus documentation 0x means the coil table. It is not hexadecimal. Hexadecimal addresses are vanishingly rare in device manuals, so 0x10 in a Modbus table almost certainly means coil number 10, not the number 16.

How to tell which convention a document uses

How to confirm it without guessing

Read three registers in a row and compare all three against what the equipment's own display shows. If the value you wanted appears one slot earlier or later than the document says, you now know the convention and every other row in that document falls into place at once.

Some equipment documents are simply wrong about this, including from large manufacturers. Trusting the reading over the document is the right instinct.

Why it ended up like this

The five-digit notation comes from the original Modicon PLCs, where memory references were written that way and counted from one. The protocol itself always counted from zero. Forty-five years of documents later, both conventions are still in active use, often in the same building, sometimes in the same PDF.

Easy Modbus sidesteps the problem: type the address however your manual writes it — 40007, 4x00007 or 6 — and it tells you how it read it and which register that actually is, before you save anything.