Troubleshooting guide

Why Are My Modbus Values Wrong Even Though Communication Works?

When replies arrive but numbers are wrong, check register offsets, data types, word order, signed values and scaling, with a decoded register.

Controls & Instrumentation · Last reviewed

If communication works, the device is answering and the link is healthy. A wrong value then means the PLC reads the right bits and interprets them wrongly. There are a small number of ways this happens, and each leaves a recognizable pattern.

Writing to a Modbus register changes the process. When testing, use read-only functions first, and make any write only with the approval of the system owner and with the process in a safe state.

PatternLikely causeWhat to check
Values belong to the neighboring registerAddress offset: documentation counts from 1 (for example 40001), the protocol uses 0Whether the tool or PLC expects a base-0 or base-1 address
Value is a huge or tiny number, or looks randomFloat read as integer, or word order wrong in a 32-bit valueData type in the device manual, and the word order setting
Reading jumps to 65,000+ when it should be negativeSigned 16-bit value read as unsignedSigned or unsigned type in the PLC tag
Value is off by a factor of 10, 100 or 1,000Scaling factor missingManual: engineering units per count (for example 0.1 °C)
Only some registers are wrongDifferent data types in one block, such as 16-bit and 32-bit valuesThe register map for each address
Value is correct but delayed or staleSlow polling or a cached value in the devicePolling interval and the update rate of the device

One decoded-register example

A temperature transmitter is documented as a 32-bit float starting at address 40001. The PLC reads two registers and shows 0x41C8 and 0x0000.

InterpretationResult
Two registers combined as 0x41C8 0000, read as an IEEE 754 float (correct order)25.0
Same two registers with the words swapped (0x0000 41C8), read as a float2.4 × 10⁻⁴¹ (nonsense)
First register alone, read as an unsigned 16-bit integer16,840
Both registers read as a 32-bit integer1,103,626,240

The value 25.0 °C appears only with the right type and the right word order. The float 0x41C80000 has a sign bit of 0, an exponent of 131 (2⁴ = 16), and a mantissa of 1.5625, so 1.5625 × 16 = 25.0.

A signed 16-bit register shows the same kind of error. A register value of 65,436 read as unsigned is 65,436, but read as signed it is 65,436 − 65,536 = −100. With a scaling of 0.1 °C per count, that is −10.0 °C.

A systematic way to check

  • Read the raw register values first, in hexadecimal, before any conversion.
  • Find the register in the manual and note the type, the word and byte order, the scaling and the units.
  • Compare with a known value from the device display, and test with a value that is easy to check, such as a setpoint you can change.
  • Change one thing at a time: offset, then type, then word order, then scaling.

Write a useful problem statement

  • Device model, the register address from the manual and the type it states.
  • The raw register values (hex or decimal) and what the PLC shows.
  • The value shown on the device display at the same time.
  • The PLC or tool used, and its address, word-order and data-type settings.

Related tools and labs

Calculators, labs and simulators are part of the All-Access Pass.

More troubleshooting

Questions

What is byte and word order?

A 32-bit value takes two 16-bit registers. Devices differ in which register holds the high half, and within a register which byte comes first. Many PLCs let you choose the order.

Why do manuals use 40001?

Modbus documentation often uses a convention that numbers holding registers from 40001. The protocol address is that number minus 40001. Tools differ in which they expect.

How can I confirm the scaling?

Compare against a reading on the device display, or against a calibrated reference, at two different values.

Educational material. Examples use simplified, hypothetical inputs and are not a design, a construction document or professional engineering advice. Confirm requirements with the codes and standards adopted where the work is built and with a licensed engineer.

← All troubleshooting