The short answer
40001 is holding register number 1, which is protocol address 0. The leading 4 is not part of the address; it tells you which table to read (holding registers, function code 03). To get the address a Modbus client sends on the wire, subtract 40001 from a holding register reference, 30001 from an input register, 10001 from a discrete input and 1 from a coil.
So 40001 is address 0, 40013 is address 12 and 30101 is input register address 100.
Why there are two numbering schemes
The Modbus specification numbers the items in each table from 1, but addresses them from 0 in the actual request: item number N is sent as address N − 1. Modicon, who created Modbus, also put the table in front as a digit, which gave the familiar 0xxxx, 1xxxx, 3xxxx and 4xxxx references. Device manuals still use that notation; most Modbus software asks for the 0-based protocol address and a separate register type.
| Manual reference | Table | Function code | Contents | Protocol address |
|---|---|---|---|---|
| 00001–09999 | Coils | 01 | Read/write bits | 0–9998 |
| 10001–19999 | Discrete inputs | 02 | Read-only bits | 0–9998 |
| 30001–39999 | Input registers | 04 | Read-only 16-bit words | 0–9998 |
| 40001–49999 | Holding registers | 03 | Read/write 16-bit words | 0–9998 |
Six-digit references such as 400001–465536 mean the same thing with room for all 65,536 addresses: 400001 is holding register address 0.
How to tell which scheme your manual uses
- Addresses like 40001, 30001 or 400001: 1-based references. Subtract the table's base.
- "Holding register 0", "HR 100" or hex such as 0x0064: usually already the protocol address. Enter it as is.
- A bare "register 1" with no prefix: ambiguous. Read address 1 and address 0 and see which one matches the value on the device's display.
- Some manuals print both, often as "Address (Decimal)" and "Register". Use the 0-based column.
Symptoms of an off-by-one
- The value is plausible but belongs to the neighbouring parameter, such as current where you expected voltage.
- A 32-bit value reads as nonsense because you are reading its second half.
- The last register in the map returns exception code 02 (Illegal Data Address), because you asked for one past the end.
The fastest check is to compare a live value against the device's own display. If the address one lower matches, your manual is 1-based.
The address is right but the number looks wrong
A holding register is a 16-bit word. Devices fit real-world values into it in a few standard ways, and each one has a quick fix:
- Scaled integers: 2345 means 234.5 V because the manual says "× 0.1". Multiply by the factor the manual gives.
- Signed values: a temperature of −10 arrives as 65,526, because the register holds a signed 16-bit number and the client reads it unsigned. Subtract 65,536 from anything above 32,767.
- 32-bit floats and long integers: these span two consecutive registers, and vendors disagree on which word comes first. Read both halves and combine them in the documented word order.
- Text such as a serial number: packed two ASCII characters per register across several consecutive registers.
Doing it in SignalStream Studio
In Studio's Modbus wizard, pick the register type (Holding, Input, Coil or Discrete Input) and type the 0-based protocol address: 40013 becomes Holding, address 12. Test Poll reads the device live before you can save, so a shifted address shows up immediately.
For a scaled value, set Scaling m to the manual's factor, such as 0.1. For a signed value, put this in the Formula field:
x - 65536 if x > 32767 else xText spread across registers is read with the String value type and a register count. Studio currently reads one 16-bit register per numeric input, so 32-bit floats that span two registers are not supported yet.