SoftControl

Protocols & device control

Modbus Register Address Offset: Translate 40001 Without Guessing

Resolve zero-based PDU addresses, human register labels and holding-versus-input tables with a read-only mapping worksheet.

SoftControl Editorial TeamPublished Updated

A Modbus register label in a manual is not always the address value placed in a request. Determine the data table and the manufacturer's numbering convention, then translate it to the protocol address expected by your client. Do not blindly subtract one from every number containing 40000.

Address mistakes can return plausible but incorrect values, which makes them harder to detect than a clear protocol error. Validate the mapping with known read-only data before allowing writes.

Separate table, label and protocol address

The Modbus Application Protocol specification defines the addressing model and separate data tables. A familiar label such as 40001 is commonly used to describe a holding-register reference; the actual request carries an address within the selected function's data table. The equipment manual must say how its published labels relate to that address.

Manual informationQuestion to resolveConfiguration field to save
Holding or input registerWhich read function applies?Data table and function
Register labelHuman reference or direct offset?Original manufacturer label
Address baseStarts at zero or one?Explicit conversion rule
Data typeOne register or several?Width and interpretation
AccessRead-only or writable?Permitted operations

Keep the original label visible in the engineering worksheet. It lets a second technician compare the configuration with the manual without reverse-engineering your conversion.

Build a small read-only proof

Choose a manufacturer-documented identification value, fixed configuration value or safely observable measurement. Note its expected meaning and permitted range. Read the documented register and compare the result with the device's local interface.

If the result is wrong, inspect table selection and address convention before trying neighbouring writable addresses. A successful protocol response only establishes that the server accepted the request. It does not establish that you selected the intended data item.

For a two-register value, confirm the starting address and width together. Reading a valid register one position late can combine the second half of one quantity with the first half of another. The output may still decode as a number.

Keep gateway routing separate

The Modbus TCP messaging guide describes transaction and routing fields around the application request. A Unit Identifier used by a gateway is a different setting from a register address. Do not compensate for a wrong downstream device selection by changing register offsets.

Record the network endpoint, downstream unit and register mapping as three separate layers. This is especially valuable when several devices share an identical map behind one gateway.

Avoid letting a UI library's display convention silently become the project convention. Some clients ask for a human register reference; others ask for a zero-based offset. Check the client documentation and inspect the outgoing request in a safe test environment when uncertainty remains.

Acceptance before enabling writes

Have another engineer use the worksheet to reproduce at least two independent known values. Include one value near the start of a documented block and another farther into the map. Confirm that both table and offset rules remain consistent.

Then validate error handling with a deliberately invalid read in a bench setup. Preserve the distinction between an illegal address response and a valid but unexpected reading. Save the manual revision with the mapping, because a firmware or equipment revision can change the register definition.

Put the conversion rule beside every imported register group. If a supplier switches from human references to direct offsets in a new manual, preserve that revision boundary. A spreadsheet import can apply a consistent but wrong adjustment to hundreds of entries. Recheck representative known values after an import or client-library upgrade, even if names remain identical. Store both the supplier's original field and the final client configuration so the conversion remains auditable.

The industrial Modbus dashboard article provides the wider application context. Use the verified register worksheet in a partner integration discussion, and keep write access disabled until each control register's meaning is independently confirmed.

Source documents

Use the source applicable to your model, firmware and operating-system edition. Read our editorial method.

Continue with a related guide