Modbus Register 40001 Returns the Wrong Value? Check the Address Offset
- PLC Play Ground
- 0
- Posted on
A Modbus connection can be healthy while every value comes from the wrong location. The common trap is confusing a register reference printed in a manual with the address entered in a client. Establish the client's numbering convention before changing any process scaling.
The numerical example assumes a map explicitly defining 40001 as offset zero.
What is happening?
The Modbus protocol uses zero-based addresses in its request data. A device manual may label the first holding register 40001, while a client may expect zero, one, or the full reference according to its interface. The function code selects the data area; the printed leading digit is not simply transmitted as part of every address.
Check these five things
-
Find the exact device register map and firmware revision. Identify whether the target is a holding register or input register.
-
Read the client's address-entry documentation. Write down both the displayed reference and the actual request offset.
-
Start with one documented, read-only value such as a model identifier or stable status word. Avoid testing address guesses with writes.
-
Record the function code, offset, register count, and returned raw words. A protocol trace can distinguish an addressing error from a display error.
-
Only after the location is proven should you apply signedness, multiword decoding, and engineering-unit scaling.
Worked example
Suppose a manual explicitly maps reference 40001 to holding-register offset 0. A client that expects raw offsets should request 0. Entering 1 would read the next register. A different client may deliberately accept 40001 and translate it internally, so copying the same entry between tools is unreliable.
Quick diagnostic reference
| Layer | Example under this map |
|---|---|
| Manual reference | 40001 |
| Protocol address | 0 |
| Read function | 03: holding registers |
The mistake to avoid
Do not assume subtracting 40001 is correct for every vendor table. Some manuals already publish raw offsets or use a different reference convention.
How to verify the fix
Read two independently recognizable adjacent values and reconcile both with the documented map. Save the working convention in the project notes.
Field-work boundary: These are educational diagnostic guides. Use the exact equipment manuals and approved site procedures. Electrical testing and machinery changes belong to qualified, authorized personnel; control hazardous energy and validate affected functions before release.
Technical reference
Modbus Organization: application protocol and implementation specifications. The examples and diagnostic tables above are original teaching material; they do not replace the product manual.
