When a Modbus value comes in wrong: byte order, multiplier, address offset
When the device answers but the value makes no sense, the cause is usually one of five settings. We show the order to check them in, with numeric examples.
Modbus does not carry what a value means; it carries only 16-bit registers. The device's document says at which address those registers sit, how many of them form one value, in which order they are combined and which multiplier applies. If the definition on the SCADA side does not match the document, the device answers without any error, but the number on screen is wrong.
This guide is for solving that case in order. The examples use the example analyzer from Adding an energy analyzer to SCADA over Modbus TCP. The map is an example made up for these guides; it does not belong to a real product:
| Measurement | Registers | Register content (hex) | Correct value |
|---|---|---|---|
| L1 current, 32-bit float | 40007–40008 | 4226 0000 | 41.5 A |
| Total active power, 32-bit float | 40019–40020 | 46BA 5400 | 23,850 W |
| Active energy counter, 32-bit unsigned | 40101–40102 | 0013 99D7 | 1,284,567 (128,456.7 kWh) |
The example device numbers its registers from 1 and sends the high word first in 32-bit values.
First tell them apart: wrong value or lost communication?
These are different problems and you look in different places. On the Monitoring > Tag States page, select the device, click Update and look at the Quality column:
| Quality | Meaning | Where to look |
|---|---|---|
| Bad | The value cannot be read from the device. | Communication: IP address, port, Slave Id, timeout, whether the address is defined in the device. |
| Uncertain | The tag has not been reached yet. | Wait if the device was just started; if it stays, treat it like Bad. |
| Good, value makes no sense | The device answers and the answer is interpreted wrongly. | The five checks in this guide. |
The Grid View tab of the Monitoring > Device States page shows the same distinction per device: Device Quality is the state of the connection, Tag Quality the state of the queries, and the Error and Error Date columns give the last error.
A hint: if only a few tags of a device are Bad and their addresses are close together, one of the addresses in the block that is read may not be defined in the device. 2Win Scada reads nearby addresses in one request; if the request fails, every tag in that request becomes Bad. Lowering Block Size on the device's Settings tab separates these tags.
If the quality is Good, go through the checks below in order. Change one thing at a time and compare the result with the value on the device's own display.
1. Address offset: from 0 or from 1?
Symptom: The value read belongs to the neighboring register. With 16-bit values the result looks plausible but is the wrong measurement (L2 voltage instead of L1 voltage, for example). With 32-bit values the halves of two different values are combined, so the result makes no sense.
Cause: Some documents number registers from 1 (40001, 40002, …), others give the protocol address from 0 (address 0, 1, …). The difference is exactly one register.
Example: Total active power is in registers 40019–40020. If the definition is shifted one register forward, 40020–40021 are read: the second half of the power, 5400, is combined with the next register. If the next register is 0, the result is 5400 0000, which as a float is about 2.2 × 10¹². The expected value was 23,850.
In the product: The Zero Based option on the device's Settings tab.
| Zero Based | Address | Protocol address sent to the device |
|---|---|---|
| Selected (default) | 400019 | 18 |
| Cleared | 400019 | 19 |
Keep the option selected if the document numbers registers from 1. Clear it if the document gives addresses from 0. The option applies to every tag of the device.
Screenshot: 2Win Scada 2.11.5, the Settings tab of a Modbus TCP device; First Word Low 32 Bit is cleared because the example device sends the high word first.
2. Register area: holding or input?
Symptom: The tag stays Bad, or a completely different value arrives.
Cause: Holding registers and input registers are separate areas and are read with separate functions. A holding register and an input register with the same number can hold different values; many devices offer measurements in only one of them.
Example: If the document says "Input registers (function 04), register 7", the address must be 300007. If you write 400007, 2Win Scada asks for the same number as a holding register (function 03).
In the product: The first digit of the tag's Address field.
| First digit | Area | Read function |
|---|---|---|
0 | Coil | FC01 |
1 | Discrete input | FC02 |
3 | Input register | FC04 |
4 | Holding register | FC03 |
The address is written with 6 digits (400007); the 5-digit form (40007) points to the same register. If the register number is above 9999, the 6-digit form is required: holding register 12001 becomes 412001.
3. Data type: 16-bit, 32-bit or float?
Symptom: The value is always an integer and seems unrelated to the measurement; or a value that should be negative appears around 65,000.
Cause: The same registers turn into different numbers with different types.
Example: The two power registers 46BA 5400, read with three different types:
| Data Type | Value read | Explanation |
|---|---|---|
| Real | 23,850 | Correct: 32-bit float |
| DInt | 1,186,616,320 | The same 32 bits, interpreted as an integer |
| Word | 18,106 | Only the first register (46BA) was read |
The quality is Good in all three rows; the device answered all three queries correctly.
Screenshot: 2Win Scada 2.11.5, Tag States; all three tags read address 400019, only the Data Type differs. The values come from the Modbus simulator prepared for this guide.
The sign is the same kind of error: a 16-bit register that holds −150 reads −150 as Int and 65,386 as Word.
In the product: The tag's Data Type field. How the names in documents map:
| In the document | Data Type | Registers |
|---|---|---|
| INT16, signed 16-bit | Int | 1 |
| UINT16, unsigned 16-bit | Word | 1 |
| INT32 | DInt | 2 |
| UINT32 | DWord | 2 |
| FLOAT32, IEEE 754 single | Real | 2 |
| INT64 | LInt | 4 |
| UINT64 | ULInt or LWord | 4 |
| FLOAT64, double | LReal | 4 |
Length is always 1 for Modbus tags; also for a type that occupies several registers, the tag takes only the address of the first register.
4. Word order and byte order
Symptom: The type is right, the address is right, but the 32-bit value is a very large number or a number very close to zero.
Cause: A 32-bit value is split across two registers. Some devices send the high word first (big-endian, "ABCD"), others the low word ("word swap", "CDAB").
Example: The example device sends the high word first. If the setting is left the other way round:
| Measurement | Correct order | Read in the reversed order |
|---|---|---|
Power (46BA 5400) | 23,850 | 5400 46BA → about 2.2 × 10¹² |
Current (4226 0000) | 41.5 | 0000 4226 → a number very close to 0 |
Counter (0013 99D7) | 1,284,567 | 99D7 0013 → 2,581,004,307 |
In the product: The First Word Low 32 Bit option on the device's Settings tab.
| First Word Low 32 Bit | First register | Common name |
|---|---|---|
| Selected (default) | Low word | Word swap / CDAB |
| Cleared | High word | Big-endian / ABCD |
Clear the option if the document says "high word first" or "big-endian". For 64-bit values there is also the First DWord Low 64 Bit option; the table in the manual shows all four combinations.
Two limits:
- These options apply to every tag of the device. If one device uses two different word orders, read one of the values as two separate Word tags and combine them with an advanced tag expression.
- The byte order inside each register is fixed by the Modbus standard (high byte first), and 2Win Scada has no setting that changes it. A device that sends the bytes inside a register reversed is handled the same way: read the register as Word and correct the value with an expression.
5. Multiplier and unit
Symptom: The value resembles the right measurement but is 10, 100 or 1000 times too large or too small; or current and power are too small by the current transformer ratio.
Cause: Many devices send a decimal value as an integer and give the multiplier in the document ("0.1 A", for example). Some analyzers also leave the current and voltage transformer ratios out of the value and send the secondary value.
Example:
| Case | Raw value | Scale Min Raw – Scale Max Raw | Scale Min – Scale Max | Result |
|---|---|---|---|---|
| Current in steps of 0.1 A | 415 | 0 – 10 | 0 – 1 | 41.5 A |
| Power in W, kW wanted on screen | 23,850 | 0 – 1000 | 0 – 1 | 23.85 kW |
| Secondary current, transformer ratio 200/5 | 1.04 | 0 – 1 | 0 – 40 | 41.6 A |
In the product: The Scale fields in the tag row: Scale Active, Scale Min Raw, Scale Max Raw, Scale Min, Scale Max. Scaling is linear; values outside the range are converted with the same ratio. If Scale Min Clamp Active and Scale Max Clamp Active are selected, the result is held at Scale Min and Scale Max.
The Unit field is only a label; it does not convert the value. When you change the scaling, update the unit as well.
The consumption calculation has a multiplier of its own: Factor and Divisor in the log definition convert the calculated consumption; they do not change the tag's current value.
Quick checklist
| What you see | Where to look first |
|---|---|
| Quality Bad | Communication: Device States, IP address, port, Slave Id, Block Size |
| The value of a neighboring measurement | Zero Based |
| An unexpected value, or Bad only at some addresses | The first digit of the address (3 or 4) |
| A meaningless integer, a value around 65,000 | Data Type |
| A 32-bit value that is very large or close to zero | First Word Low 32 Bit |
| A difference of 10, 100 or 1000 times | Scale |
After changing the device settings or the tag list, remember to reinitialize the device: the Reinitialize Device button next to the device in the Tag Management tree.
Related pages in the manual:
- Modbus Addressing: address format, data types, word order tables and read groups.
- Modbus TCP: device settings, timeouts and connection behavior.
- Tag Management: the scaling fields.
- Advanced Tag Definition: combining values with an expression.
- Tag States and Device States.
If you would like to go through your own device's map together, we can do that in a demo meeting.

