Troubleshooting
Decoding Modbus holding register 4500001 from PLC to HMI
Short answer
Holding register 4500001 is a typed reference, not the address on the wire: the leading 4 marks the area, the rest is a 1-based register number, and under the six-digit convention it must fall inside 400001-465536, so the reachable target is 450001, protocol address 50000. Match the slave ID and 8E1 serial settings, prove the read with an independent master, then enter the address in the HMI driver's own convention.
On this page
Holding register 4500001 is a typed reference, not the address that travels in the frame. A Modbus RTU request carries a function code and a 16-bit starting address, so the leading 4 is a prefix marking the holding-register area and the remaining digits are a 1-based register number. Under the six-digit convention that number must fall inside 400001–465536; 4500001 points at register 500001, which no standard request can select, so the reachable target is 450001 — protocol address 50000. Confirm that in the PLC's Modbus slave tag table, match the slave ID and serial settings, prove the read with an independent master, and only then enter the address in the HMI driver's own notation.
The reference and the address are two numbers #
The first digit of a reference names the area: 0 for coils, 1 for discrete inputs, 3 for input registers, 4 for holding registers. The digits after it are the register number, counted from 1. The protocol address carried in the request is that number minus one, expressed in 16 bits (0–65535). The MODBUS Application Protocol specification sets function code 03 for reading holding registers, up to 125 registers per request, with function 06 writing one register and function 16 writing several.
Every tool in the chain can print the same word under a different label, and some test programs offer an explicit 0-based or 1-based entry mode. This table is the whole translation:
| Reference as printed | Convention | Register number | Protocol address | Reachable |
|---|---|---|---|---|
| 40001 | five-digit | 1 | 0 (0x0000) | yes |
| 400001 | six-digit | 1 | 0 (0x0000) | yes |
| 450001 | six-digit | 50001 | 50000 (0xC350) | yes |
| 4500001 | seven digits | 500001 | 500000 | no, it exceeds a 16-bit field |
As written, 4500001 cannot be selected: the starting-address field stops at 65535. Count the digits in the tag-table entry before anything else. Either the entry is 450001 and a zero crept into the transcription, or the vendor's slave table uses a paged scheme in which an extra digit selects a bank — only that manual defines the mapping, and the bench read settles which case you have. The same minus-one rule bites on the input side, which is why reading Modbus discrete input 10001 in a Vijeo HMI trips identical arithmetic on 1xxxx references.
Prove the register with an independent master #
Before editing the HMI project, make one device tell the truth:
- Put a USB-to-RS-485 adapter on the pair as the only master: stop the HMI's driver or lift its connection, because an RTU segment carries exactly one requester.
- Set the tool's slave address to the ID configured in the PLC; valid IDs run 1–247 and 0 is broadcast only.
- Issue function 03, starting address 50000, quantity 1.
- Read the outcome literally. Total silence indicts the transport, the ID or the serial settings; an exception response proves the slave is alive and rejected the request; a returned value proves the translation.
- Record whether the tool accepted a 0-based address or a 1-based reference, and the raw contents it showed.
For the silent-bus branch worked end to end, see troubleshooting an HMI Modbus device with no response over RS-485.
The settings that must match at both ends #
- Slave ID: the HMI's station number for the PLC must equal the PLC's configured Modbus ID. One digit off and the PLC stays silent by design.
- Baud rate: identical at both ends; 9600–115200 bit/s covers the usual installations.
- Character format: 8 data bits, even parity, 1 stop bit (8E1) is the documented RTU default of the Modbus serial-line specification. Whatever is actually configured must match exactly at both devices.
- Pair polarity: A/B and +/− labels are not consistent between products. Wire from the terminal diagrams; if the bus is dead, swap the pair once at one end and write down the outcome rather than swapping repeatedly.
- Termination: 120 Ω at the two physical ends of the trunk only, with biasing per the interface documentation; a resistor at every drop loads the bus toward silence.
Isolate power before touching terminals, and treat the signal-reference conductor between the two devices as part of the wiring, not an afterthought.
A worked read: one tag, three entry forms #
A PLC tag — call it TankLevel — sits in the slave table at reference 450001, six-digit convention, holding 1000 counts.
Translate it: 450001 − 400001 = 50000, and 50000 decimal is 0xC350 (49152 + 768 + 80). The bench master issues function 03, address 50000, quantity 1, and returns 0x03E8 = 1000, matching the online value in the PLC programming software. The register is proven.
The same word then goes into the HMI three ways, depending on the driver:
- a driver that takes six-digit references gets 450001;
- a driver that takes raw 0-based addresses gets 50000;
- a driver that takes 1-based register numbers gets 50001.
All three select the same word on the wire. The screen must show 1000. If the bench value is 1000 and the screen is blank or faulted, the fault sits in the HMI's port assignment, driver binding or tag entry — not in the link.
When the read works but the number is wrong #
A register is 16 bits at protocol level, while the PLC tag behind it may be an unsigned word, a signed word, or a 32-bit value spanning two consecutive registers. Suppose TankLevel were 32-bit with value 1000, stored high word first: register 50000 holds 0 and register 50001 holds 1000. A driver assembling low word first computes 1000 × 65536 = 65,536,000 and displays it. The bits are correct; the word order is not, and the driver's word-order setting is the fix. The same class of fault — right register, wrong interpretation — is worked through in displaying a PLC real value over Modbus on an HMI, where floating-point values span two registers.
What each symptom decides #
- No reply to the bench master: the path owns the problem — slave ID, baud or parity, pair polarity, termination. Fix the transport before judging the register.
- Exception response: the slave answered, so ID and serial settings are good; the address or quantity is outside its map. Re-do the translation.
- Clean bench value, blank or faulted HMI tag: the HMI project owns the fault — wrong port, driver not bound, address typed in the wrong convention.
- Clean read, wrong number on screen: match the HMI tag's data type, register count, word order and scaling to the PLC tag definition exactly.
Questions asked
Can the HMI stay on the bus while the bench master tests the register?
No. Modbus RTU has no multi-master arbitration: with two masters on one pair, requests interleave, frames collide, and both devices see CRC failures or capture each other's responses. Stop the HMI's driver or disconnect it so the bench master is the only requester, run the test, then restore the HMI and compare its behavior against the proven read.
The register reads 65336 but the PLC tag shows negative 200. Why?
The bits are right and the interpretation is not. 65336 decimal is 0xFF38, and read as a signed 16-bit word that pattern is 65336 - 65536 = -200. Set the HMI tag's format to the PLC tag's signedness and the display follows. A successful read never proves the sign convention, because signed and unsigned tags share one wire format.
What do the Modbus exception codes tell me?
Exception 01 means the function code is unsupported. Exception 02 means the starting address or quantity falls outside the slave's map, so the translation is wrong while the wiring is good. Exception 03 means a value in the request itself, such as the register count, is invalid for that device. Any exception reply proves the slave ID and serial settings are correct.
My HMI driver only accepts references up to 49999. Now what?
That is the five-digit ceiling at work: 49999 - 40001 = 9998, so a five-digit driver can never form the request for address 50000 even though the protocol field allows it. Move the PLC tag to a lower register in the slave table, or use a driver that accepts six-digit references. The address field is not the limit here; the driver's entry format is.
Why does the documentation keep saying 8E1?
It is the documented default RTU character format for Modbus serial links: 8 data bits, even parity, 1 stop bit. The other documented variant drops parity and uses two stop bits instead. Both ends must use the identical format, because a parity mismatch corrupts the frame check and shows up as silence or repeated CRC errors, never as a wrong but plausible value.