PLC & Data
Modbus Register Address Converter
Convert between the traditional data model number such as 40001 and the protocol address that actually goes on the wire, with the function code shown.
Calculated reference results
- Protocol address (on the wire)
- 9
- Traditional data model number
- 40010
- Data table
- Holding Registers (4x)
- Read function code
- 03 Read Holding Registers
- Write function code
- 06 / 16 Write Register(s)
- Protocol address in hex
- 0x0009
- Next register (for a 32-bit value)
- 10 protocol, 40011 traditional
A 32-bit value occupies this register and the next one. Word order is not defined by the standard.
The arithmetic
- Holding Registers (4x) base is 40001 in the traditional model
- Protocol address = 40010 - 40001 = 9
What this does not account for
- Device documentation frequently fails to say which convention it is using. If a value is close but consistently belongs to the neighbouring point in the map, you are off by one.
- Some devices document a base of 40000 rather than 40001, which shifts everything by one again. Prove the map with a Modbus test utility before writing controller logic.
- A 32-bit value spans two consecutive registers and the standard does not define which comes first. Read a known value to determine the order.
How this is calculated
Modbus documentation uses two conventions for the same register. The traditional data model numbers holding registers from 40001, while the protocol address that goes on the wire starts at 0. Traditional 40010 is protocol address 9. Being off by exactly one register is the single most common Modbus integration error.
Assumptions and limitations built into this calculator
- The traditional data model bases of 1, 10001, 30001, and 40001.
- Does not cover devices that document a 40000 base or use vendor-specific addressing.
Frequently asked questions
- Is 40001 the same as address 0?
- Yes, in the traditional data model. Holding registers are numbered from 40001 in documentation, while the address placed on the wire starts at 0.
- What is an illegal data address exception?
- Exception code 02. The device heard the request and understood it, but the register or the block extends past the end of its map. That is good news compared with silence, because it proves the wiring, address, and framing are all correct.
Direct contact
Have a controls question?
Reach Eric Sullivan directly about anything on this site, a controls or automation topic, or one of his personal projects.