·
Module 05Addressing & Data Meaning6 min.md

Modbus Addressing

Overview

What you'll learn

0-based wire addresses vs 1-based documentation, and how off-by-one bugs are born.

Sections
11
Labs
1
Quiz
7 Qs
What you'll be able to do
  • Convert documented (40001-style) addresses to PDU wire addresses correctly.
  • Explain why the same register is called 40001 in one tool and 0 in another.
  • Spot off-by-one bugs from a capture in under a minute.
Why you'll need this
  • "Vendor manual says 40001 — your tool asks for an address from 0. What do you enter?"
  • "You see a response for register 40000 when the operator asked for 40001. Where does the error live?"
Three things people get wrong
  1. 1.
    Subtracting 1 instead of 40001
    Fix Documented holding 40001 → PDU 0, not 40000. The 4xxxx digit prefix marks the data table, not an offset.
  2. 2.
    Confusing 'register number' with 'address'
    Fix Always restate as 'documented address X → PDU address Y' before sending anything.
  3. 3.
    Assuming all tools use the same convention
    Fix Some tools are 1-based, some 0-based. Verify with a known-good register before any write.
From the field

The off-by-one that swapped a setpoint

A SCADA integrator copied the documented address straight into a 0-based tool. The PLC happily wrote the requested value to the register one below the intended setpoint — which happened to be a calibration constant. Production drifted for two days before someone diffed the trends.

Cited sources

Primary sources come from protocol and standards publishers. Secondary sources provide supporting tool, vendor, or reference context.

This module is paginated — step through the sections, run the labs, then take the quiz. Progress is saved locally.

Print one-pager →