Troubleshooting
Why a Modbus RTU Master Write Never Reaches an HMI Holding Register
Short answer
Check four layers in order: bond both devices to the supply's minus terminal as the common DC reference, not the chassis-connected GND terminal; match master and slave roles plus 9600 8E1 framing; sniff the bus to confirm the full frame arrives with a valid CRC, because an early driver-enable release corrupts the last byte; and enter register 40001 as address 0x0000 on the wire.
On this page
A Modbus RTU master write that never lands in an HMI holding register fails at one of four layers, and the layers fail in a fixed order: the two devices share no DC reference, the roles or the serial framing do not match, the RS-485 driver-enable releases before the last byte leaves the wire and breaks the CRC, or the register offset is entered in the wrong convention. A passive USB-RS485 adapter on the bus tells you which layer you are in from a single capture. Work them in that order and you fix the fault instead of guessing at it.
Work the layers in order #
Each layer has its own pass signature. Confirm one before you move to the next, because a screen that never updates cannot tell you which layer failed.
- DC reference - bond the controller and the panel to the supply's minus terminal, not the chassis-connected GND terminal. Pass: 0 V between the two reference terminals.
- Roles and framing - controller as Modbus RTU master, panel as RTU slave with the target register writable, 9600 baud, 8 data bits, even parity, 1 stop bit. Pass: the master's transmit block executes.
- Capture - a passive USB-RS485 adapter across A and B. Pass: the full eight-byte request with a CRC the adapter accepts.
- Driver-enable timing - release the enable only after the final byte is fully out. Fix: flush the transmit buffer, then release, then hold through the frame end.
- Register address - 40001 on the panel map is 0x0000 on the wire. Pass: the captured address bytes match the panel's register.
- Display binding - echo received, register written, screen still stale. Decision: the fault is the screen object, not the link.
Give both devices one DC reference #
RS-485 receivers decide on the voltage difference between A and B, but only inside the transceiver's common-mode window, which the RS-485 standard (TIA/EIA-485) sets at -7 V to +12 V relative to the receiver's reference. Two separate 24 V supplies have floating outputs, so nothing latches one device's reference to the other's. Outside that window the receiver reads noise no matter how clean the signal is.
The terminal that misleads is the one labelled GND on many panel supplies: it is bonded to the supply's chassis, not to the DC output. The DC return is the minus terminal. With the panel powered down, move the communication reference to a minus-to-minus bond, and let the sensor supply's return share that minus terminal if its manual puts the output return there. Protective earth stays where the supply manual puts it; it is a safety bond, not a signal reference.
Power up and measure between the two devices' reference terminals. You should read 0 V, a fraction of a volt at most. Before the bond, that same reading drifts or floats, and the drift is your confirmation that the reference was the fault. Terminate the trunk with 120 Ω across A and B at both cable ends and keep the drops short.
A swapped or mislabelled A/B pair looks identical on the screen: total silence. The FX3GE RS422 to HMI wiring fix is the same class of fault, caught at the terminals rather than in the configuration.
Match roles, framing and address #
On this link the controller originates every transaction and the panel only answers, so the panel project must run its serial port as an RTU slave and expose the target register as writable. Most HMI jobs run the other way, with the panel as master polling a drive, the direction used when connecting an HMI directly to a VFD over Modbus RTU. A panel left in master mode never accepts your writes, whatever the wiring does.
The Modbus RTU specification fixes the serial format: 8 data bits always, even parity with 1 stop bit as the default, and 2 stop bits when parity is off. Set both ends identically at 9600 baud; a mismatch shows up as bytes the listener cannot decode.
Slave addresses run from 1 to 247. Address 0 is broadcast, and no slave ever answers a broadcast, so commission on the panel's own address and let the reply be your acceptance check.
| Setting | Both ends must show | How a mismatch fails |
|---|---|---|
| Baud rate | 9600 | bytes the listener cannot decode |
| Data bits | 8, always for RTU | framing errors, no reply |
| Parity and stop bits | even, 1 stop; or none, 2 stop | framing errors, no reply |
| Slave address | 1 to 247, matching the panel project | address 0 is broadcast and never answered |
| A and B | each device's terminal drawing | maker labels are not uniform |
Put a third adapter on the bus #
A USB-RS485 adapter used as a listener sits across A and B at the panel end, claims no address, and decodes the traffic at 9600 baud. It does two jobs. It shows whether the master's frame reaches the wire intact, and it can act as a temporary master to query the panel directly, which splits "the master never speaks" from "the slave never answers" in one test.
When the capture shows a healthy frame but no reply, work the layers from the panel side with the RS-485 no-response checklist for an HMI, which covers the same silence from the other direction.
Release the driver enable after the last byte #
RS-485 is half-duplex: the master asserts its driver enable for the whole frame and releases it so the slave can answer. If the enable drops before the final byte has fully left the wire, that byte is truncated, the slave's CRC check fails, and the frame is discarded in silence. The bus then looks dead although the first seven bytes were perfect. The signature: a capture showing eight bytes whose last one differs from what the master sent, or a listener flagging a bad CRC, with no reply ever.
Run the timing from the numbers. An RTU character is 11 bits at 8 data bits, even parity, 1 stop bit. At 9600 baud one bit lasts 1 / 9600 s = 0.1042 ms, so one character lasts 11 × 0.1042 = 1.146 ms, and the specification demands 3.5 character times of silence between frames: 3.5 × 1.146 = 4.01 ms. The last byte's stop bit leaves the wire 1.146 ms after its start bit, so an enable that releases at 1.0 ms hands the slave a broken byte. Release the enable after the transmission has completed, not at the moment the buffer accepts the last byte.
On the Opta in PLC IDE, flush the transmit buffer before the enable drops and hold the enable through the end of the frame: call RS485.flush() before you release the driver enable, and set the post-transmission delay with RS485.setDelays().
Enter the register address the wire expects #
Function 06, Write Single Register, carries a zero-based 16-bit address on the wire, while panel maps count registers from 40001. The conversion is subtraction: wire address = reference - 40001. The panel's 40001 is 0x0000 on the wire; 40101 would be 100, or 0x0064. Some master tools take the 5-digit reference and convert it for you, others want the raw offset. Decide by capture, not by trial: bytes three and four of the frame show exactly what went out.
A complete request is eight bytes. Writing 1234 into the panel's 40001 as slave 1 gives 1234 = 4 × 256 + 210 = 0x04D2, so the frame reads 01 06 00 00 04 D2 followed by the two CRC bytes, low byte first. The valid response to function 06 is the exact echo of those eight bytes, so the echo on the listener is your proof the write was accepted.
Commission with a constant before any sensor value: write 1234, confirm the echo, then attach the analog scaling. If the echo is right and the screen still shows nothing, the display object is bound to the wrong register or set to a different format, and it will show a stale or wrong number rather than an error.
The decision for each capture #
| What the listener shows | Layer it isolates | Decision |
|---|---|---|
| Reference terminals not at 0 V, reading drifts | DC reference | power down, bond minus to minus, remeasure for 0 V |
| No bytes at all at 9600 | master side | confirm the transmit block runs and the port setting drives the RS-485 port |
| Eight bytes, the eighth wrong or the CRC flagged | driver-enable timing | flush the buffer, release the enable, hold with the post-transmit delay |
| Valid frame, no reply | framing, address or A/B | match 8-even-1, use the panel's own address, check A/B against both drawings |
| Echo received, register holds 1234, screen stale | display binding | rebind the object to that register, match format and scaling |
Stop at the first failed signature and fix that layer. Changing slave addresses cannot repair a broken CRC, and driver-enable timing cannot repair a screen object bound to the wrong register.
Questions asked
Why does the panel stay completely silent when the CRC is wrong?
Modbus RTU gives a slave no way to report a damaged frame. A frame that fails the CRC check is discarded without any reply: no error message, no exception code, nothing on the wire. Silence after a complete-looking frame is therefore the expected symptom of a truncated last byte, which is why the listener, not the panel's behavior, judges whether the frame was intact.
Can the chassis GND terminal serve as the common reference?
No. The front-panel GND terminal on that type of supply is bonded to the case and protective earth, not to the DC output, so a reference made through it leaves the two devices' returns floating relative to each other. Bond minus to minus. The communication reference and the sensor return can share the same minus terminal; parallel returns on one DC output are normal.
What should the first successful write be?
A constant, not live sensor data. Write 1234 to the register, confirm the eight-byte echo on the listener, and only then connect the analog scaling. If 1234 arrives but the screen shows something else, the link is proven and the fault is the display object's data format or its scaling.
Can the link run at 7 data bits to match an older device?
No. RTU frames are binary and the specification fixes the character at 8 data bits. Seven data bits belong to Modbus ASCII, a different transmission mode that will not interoperate with RTU devices. A device that only offers 7 data bits is speaking Modbus ASCII and needs the master set to the same mode.