IMDTouchKnowledge BaseShop main store

Troubleshooting

Why a Modbus RTU write-only node drops offline and stays off

HMI and touchscreens Published 9 min read By IMDTouch engineering team

Short answer

Your master flagged the node offline after missed replies, and on panel-PC Modbus RTU masters only a completed read puts a dropped node back in the polling list, so a node that only receives writes never returns. Add one read of a static register per write-only node every 2 seconds, latch the driver's per-node status array to catch the culprit, and compare RS-485 port settings if the fault follows one panel.

On this page
  1. Output off while the variable stays true
  2. Why a write-only node never comes back
  3. Watch the per-node status array
  4. Latch the drops in code
  5. Add one read per write-only node
  6. What the heartbeat read costs on the line
  7. Where the shared stall comes from
  8. Port and trunk checks before blaming the driver
  9. The decision for each case
  10. Questions asked

The output is off in the field, the variable in your watch window still reads TRUE, and the node is not coming back. That split is the signature of a dropped node: the master flagged it offline after missed replies, the driver now discards every write you issue to it, and on panel-PC Modbus RTU masters only a completed read puts a dropped node back in the polling list. A node that receives nothing but writes has no way home. The fix is one read of a static register per write-only node on a short period, plus the driver's per-node status array to prove which node drops and when. If every node stalls together, the trunk or the port configuration is the suspect instead.

Output off while the variable stays true #

The watch window shows your application's output image, and it stays TRUE because the logic is fine. The physical output is off for one of two reasons: the write was discarded at the driver because the node is flagged offline, or frames stopped arriving and the slave's own communication watchdog de-energized its outputs. Either way, you debug the transport and the master's node list, not the ladder or the structured text.

The field version of this fault takes one of two forms: the outputs de-energize with no operator action, the line is dead for roughly 10 to 15 s, and traffic resumes on its own — or the node never returns until something restarts.

What you see First mechanism to check First place to look
One node off, its variable TRUE, recovers after 10 to 15 s Node flagged offline, re-entered by retries or incidental reads That node's element in the status array
One node off, stays off until a restart Write-only node: no read ever reactivates it The master's node list — add the read
Every node stalls together A dead node eating the queue timeout, or a trunk fault Timeout settings; termination and bias
Fault follows the panel, a spare panel runs clean RS-485 port configuration differs between panels DIP switches and port settings

Why a write-only node never comes back #

The master keeps an online/offline flag for every configured node. Noise, a collision, a brief brownout or a slave that powers up after the master means missed replies; once the misses exhaust the retry budget, the master flags the node offline and stops scheduling it. Writes your application keeps issuing are discarded at the driver — which is exactly how the variable can hold TRUE while the coil in the field holds OFF.

On the panel-PC RTU masters in this failure class, that flag clears only when a read to the node completes: the slave answers, the master returns it to the polling list, and writes flow again. Time does not clear it, retrying writes does not clear it, and power-cycling the slave does not clear it, because nothing is ever sent to it. A node configured only for writes therefore stays offline until the master restarts or until someone configures a read. Masters that re-enter dropped nodes on a timer do exist; even there the read heartbeat is the quickest and the only observable re-entry path, so the fix is the same.

Two triggers cover most cases:

  • Slaves energized after the master has already built its node list, so their first exchanges are missed.
  • A node that browns out for a moment under load and misses its poll window.

A dropped node also hurts its neighbors: a queued master waits out its response timeout on the dead node in every cycle before it reaches the healthy ones, so one bad neighbor degrades the whole line.

Watch the per-node status array #

  • The master in this failure class exposes the flag as a BOOL array named SysMbNodeStatus, one element per configured slave node: TRUE online, FALSE offline. Other RTU masters publish the same information under their own system-variable names, so look under the driver's system or status variables.
  • Put the array in a watch window and expand every index. Catch the fault once and the pattern answers the first question: a single element toggling isolates one node, its connector or its drop; every element toggling together points at the master port, the trunk or the shared reference.
  • The index follows the master's configured node order, not the raw slave address. Confirm the mapping before concluding anything: power one node off and see which element changes.

Latch the drops in code #

A fault that appears once per shift is impractical to watch live, so count it:

VAR
  i              : INT := 0;
  NodeStatusPrev : ARRAY[0..7] OF BOOL;   (* my variable; all TRUE at start-up *)
  NodeDropCount  : ARRAY[0..7] OF UDINT;  (* my variable; all 0 at start-up *)
  NodeDropFlag   : ARRAY[0..7] OF BOOL;   (* my variable; all FALSE at start-up *)
END_VAR

FOR i := 0 TO 7 DO
  IF NodeStatusPrev[i] AND NOT SysMbNodeStatus[i] THEN
    NodeDropCount[i] := NodeDropCount[i] + 1;  (* falling edge: the node went offline *)
    NodeDropFlag[i] := TRUE;                   (* latched until cleared from the HMI *)
  END_IF;
  NodeStatusPrev[i] := SysMbNodeStatus[i];
END_FOR;
  • SysMbNodeStatus is the driver's array, used exactly as the driver declares it; the other three are mine, sized to the node count — eight here as an example — and initialized as the comments state. Put the counts on a maintenance page.
  • The test that proves the latch: with the master and its slaves alone on a bench, power one slave off for a few seconds and back on. That node's counter must rise by exactly 1, no other index may move, and repeating with a second node must move the second counter. Run this with the machine stopped; pulling connectors on a live cell to reproduce a comms fault risks the outputs you are trying to protect.
  • Read the counters as evidence: a rise on one index over a shift is a defensible answer — one node, one drop, one connector — while a synchronized rise across all indices sends you to the trunk.

Add one read per write-only node #

  • For every node the master only writes, configure at least one read transaction, even if nothing in the application consumes the value. A firmware-version or device-status register is the usual choice: the value is static and harmless to poll at any rate.
  • Set the period to 2 s per node: recovery after a drop then costs at most one period plus one transaction — no master restart, no power cycle, no operator.
  • Stagger the reads so they do not queue in the same scan; scheduling reads across many slaves on one port has its own discipline, covered in how to poll many Modbus RTU slaves from one serial master.
  • Land each read value in a variable on the maintenance page. A live, updating value is your proof that the node is back; the status bit alone only says the master believes it.

What the heartbeat read costs on the line #

Modbus RTU frames carry the slave address, a function code, the data and a CRC, and the serial-line framing requires a gap of at least 3.5 character times between frames. Example inputs: 19200 bit/s with 11 bits per character (start, 8 data, parity, stop), eight nodes, one read of one 16-bit holding register per node every 2 s, and an assumed 10 ms slave turnaround. The frame times below are calculated from the standard frame lengths; the turnaround is an example to replace with your slave's documented response time.

  • Request, read one holding register: 8 bytes × 11 bits = 88 bits → 88 / 19200 ≈ 4.6 ms.
  • Reply with one 16-bit register: 7 bytes × 11 bits = 77 bits → 77 / 19200 ≈ 4.0 ms.
  • The two gaps bracketing the request and the reply: 2 × 3.5 characters = 77 bits → ≈ 4.0 ms.
  • Calculated serial minimum per poll: 4.6 + 4.0 + 4.0 ≈ 12.6 ms; with the example turnaround, ≈ 22.6 ms. Driver scheduling, measured device response and retries sit on top of this minimum.

Line load: 8 nodes × 22.6 ms ≈ 181 ms of line time per 2 s cycle → 181 / 2000 ≈ 9%. Decision: at that rate the heartbeat is cheap — add it to all eight nodes and keep your existing writes. At 9600 bit/s the serial minimum doubles to about 25 ms, so eight polls cost ≈ 282 ms per cycle, ≈ 14% — still comfortable. If your write traffic already runs the line hard, add the reads one node at a time and re-check the status array after each addition, because an overloaded line manufactures the very timeouts you are curing.

Where the shared stall comes from #

  • When the outage hits every node at once and clears by itself, a dead or marginal node is eating the queue. With a response timeout of 1 s and three attempts — an example; read your own settings — one dead node costs 3 s of dead air per cycle before the master reaches the healthy nodes, and the healthy slaves' communication watchdogs de-energize their outputs in the meantime. That is the mechanism behind a network-wide blackout that heals when the master finally re-enters the node or an incidental read completes.
  • Reported timeout settings range from a gateway's 3 s default to 16 s on one SCADA driver; with one slave powered off, a queued master spends that much of every cycle on nothing, and the stall reaches every device on the line.
  • Decision: set the response timeout to about three times the slowest slave's documented response time and give node re-entry to the periodic read. A node that genuinely needs many seconds to answer is a node to repair or replace, not to wait for.

Port and trunk checks before blaming the driver #

  • If the fault follows one panel while a spare panel runs the same network clean, compare the RS-485 port configuration. On several panel PCs the termination and bias are set by DIP switches, sometimes fitted under the pluggable terminal blocks — power down, unplug the blocks to see them, photograph both panels, and treat any difference as a defect until explained. Re-seat the blocks fully; a partially seated pluggable connector is a classic intermittent.
  • Land the pair A to A and B to B at every node, keep the segment a daisy chain with termination at the two physical ends, bias at one point, usually the master, and a common reference between master and nodes.
  • If every element toggles together and the settings already match, the physical layer is the suspect, and the sequence in fixing HMI Modbus device no response over RS-485 applies directly. If a PLC or a second master also polls the line, the collisions look identical; that case is covered in HMI Modbus timeout caused by a PLC master-slave conflict.

The decision for each case #

  • One node off, its variable TRUE, and it never returns: it is write-only. Add the periodic read, confirm the status element returns TRUE and the read value updates, and the fault is closed.
  • Every node stalls for roughly 10 to 15 s and then recovers: a dead or marginal node is eating the queue. Find it with the drop counters — the index that rises first — then fix its connector, its drop or its power-up sequence; the heartbeat read caps every future event at one period.
  • The fault follows the panel: the port configuration or the panel itself. Match the DIP settings to the known-good panel, rerun with the counters latched, and if they still climb on identical settings, the panel is the suspect.
  • Slaves energize after the master: expected, and covered — the periodic read returns each one within a period of power-up, so no restart discipline is needed.

Questions asked

Which register should the reactivation read use?

Any register the slave answers without side effects. A firmware-version or device-status register is the usual choice because the value is static. Avoid registers that clear or release data when read, such as event logs or FIFO buffers, because a fast poll would drain them. If a slave implements no read function code at all, ask its manufacturer which read it supports; a device that answers no read cannot be brought back this way and needs a master that re-enters dropped nodes by itself.

Will more retries or a longer timeout fix it instead?

No. Retries recover one missed reply, but once the master flags a node offline it stops scheduling that node entirely, so extra retries only lengthen the stall a dead node imposes on the healthy nodes queued behind it. On these masters the offline flag clears when a read to the node completes, not when a write would have succeeded. Give retries their real job, riding out single corrupted frames, and give node recovery to the periodic read.

A spare panel ran the same network without the fault. Does that clear the cabling?

Not conclusively. The fault is intermittent, so a short test with a spare panel proves little until it has run longer than the interval between faults. Panels also differ in RS-485 port settings such as termination and bias, so two panels can behave differently on the same marginal line. Compare the settings first, then rerun the spare with the drop counters latched, so you compare counted events instead of impressions.

Does the same write-only trap exist on Modbus TCP?

Rarely. The drop-and-reactivate mechanism belongs to serial RTU masters that keep one polling list for a shared line. A TCP driver normally holds a connection per device, reports a failed connection directly, and reconnects on its own, so a write-only device is not locked out the same way. If a TCP device's values freeze instead, check its connection state and whether it still answers a read.

Keep reading

  • How-to

    Setting Up DOPSoft Modbus RTU for an HMI to Drive Link

    Select Modbus as the manufacturer in DOPSoft, choose RTU Hex Address Master (ASCII Hex Address Master only on a drive set to ASCII), copy the drive's serial parameters into the COM port — the factory frame is 9600, 8/Even/1 in RTU at station 1 — and prove the link with one read at a hex address such as 2000 (= 8192 decimal).

    HMI and touchscreens

  • Selection guide

    Selecting an HMI That Talks Modbus RTU to Remote I/O

    Select the HMI whose exact software release documents a Modbus RTU client driver that can open the serial port, or route the data through a supported communications server. Prove the choice by polling one module and reading the driver diagnostics before comparing graphics or scripting.

    HMI and touchscreens

  • Troubleshooting

    Fixing HMI Modbus Device No Response Over RS-485

    Device no Response means the slave never returned a valid frame to that request. When a PC polling tool reads the same scanner, the bus is probably carrying two masters: run one master at a time, then copy the known-good read's serial settings, station address, and register offset into the HMI.

    HMI and touchscreens

Comfort Panel backlight switch-off: why the screen stays lit