IMDTouchKnowledge BaseShop main store

Troubleshooting

Separating PLC scan time from real HMI communication faults

HMI and touchscreens Published 7 min read

Short answer

Scan time is the wrong first suspect for a lost HMI or Modbus update: a 10 ms scan cannot trip a 500 ms timeout. Commission the programming link, the PLC-to-HMI link, remote I/O and Modbus peers separately, read the error counters while the fault is present, and treat scan time as the cause only when the measured scan approaches the smallest communication timeout on the system.

On this page
  1. Why a long scan rarely explains a lost update
  2. Commission four paths separately
  3. Match the symptom to the path
  4. Capture diagnostics before changing anything
  5. Worked example: where the milliseconds go
  6. The controlled scan-time test
  7. What to decide for each case
  8. Questions asked

Scan time is the most over-diagnosed cause of HMI communication faults. A controller that scans in 10 ms cannot time out a driver that waits 500 ms, so before touching scan settings, prove which path failed. Commission the programming link, the PLC-to-HMI data link, the remote I/O link and the Modbus peers as four separate circuits, read the error counters while the fault is present, and treat scan time as the cause only when the measured scan is a large fraction of the smallest configured timeout. When someone reports that raising scan time "fixed" comm errors, that is a coincidence until the counters show it: change one factor, watch the counters, restore the value if nothing improves.

Why a long scan rarely explains a lost update #

A PLC executes logic, then services I/O and communications as system overhead; the controller's processing speed and that overhead, including I/O scanning and communications, set the actual scan time. The CPU empties and fills port buffers in a slice of each scan or on interrupt, while the HMI's poll and the driver's timeout run on their own clocks. A tag your logic writes this scan reaches the HMI after at most one scan plus one poll period, so scan time becomes a communication factor only when it grows to the same order as the poll cadence or the driver timeout. The worked example below shows both cases with numbers.

What pushes scan time up: larger program size, heavier communication traffic, more complex logic routines. What a genuinely high scan time causes: slow machine response, delayed alarms, HMI lag, SCADA update delay, and degraded PID sampling, because the loop sees the process less often. If that cluster appears together with comm errors, execution timing is in play; comm errors alone usually are not it. When the screen lags but the link is healthy, cadence and rendering are the suspects, the same split made in why HMI point updates run slow on an Ethernet PLC link.

One platform behavior matters here: some controllers, when a task overruns its allotted time, save their place and continue the task on the next scan instead of faulting. On those platforms a stretched response hides inside normal operation, so read the controller's own current and maximum scan values rather than inferring from symptoms.

Commission four paths separately #

A control system runs several communication paths over shared hardware, and only the one you test is proven. Treat these as four circuits:

  • Programming link, engineering tool to controller: its own protocol and transport, its own failure mode.
  • PLC-to-HMI data link: driver selection, addresses, poll cadence, timeout and retries.
  • Remote I/O link: its own diagnostics, watchdog and wiring, independent of the HMI.
  • Modbus peers: serial wiring or Ethernet path per peer, plus the master's servicing time.

The BRX platform makes the separation concrete: its RS-232/485 port is documented in the BRX user manual for Do-More Designer programming software, Modbus RTU master or slave devices, and DirectLogic PLCs via K-Sequence, while the Ethernet programming session travels over UDP. Two consequences follow. A network that passes TCP-based HMI traffic can still block the programming tool, and one physical port serving several protocols means the health of one service says nothing about the next.

Match the symptom to the path #

Symptom while machine control continues Failing path First check
Programming software cannot connect Workstation-to-PLC path Confirm addresses, then verify the network permits the programming transport, UDP on platforms that use it
HMI values freeze, outputs keep running PLC-to-HMI link or addressing Compare HMI communication status with live PLC values and confirm the controller executes
Remote I/O reports loss of communications PLC-to-remote-I/O link Read the remote I/O diagnostics; do not file it under Modbus without evidence
Modbus peers stop responding Serial wiring or Ethernet path, peer availability Establish whether one peer or all peers failed, then read the master's comm error counters
Screen slows as graphics animate HMI rendering load Reduce stacked, visibility-tagged bitmap objects and retest response

A frozen screen with the machine still running is the classic case for checking an HMI display fault with PLC outputs off: it establishes that the controller still executes, so the fault lives in the link, the addressing or the panel, not in the program.

Capture diagnostics before changing anything #

  • Read the PLC, HMI and peer communication error counters while the fault is present, and write down values with timestamps.
  • Record the scope: which devices lose data, whether the loss is continuous or intermittent, and whether logic keeps executing.
  • Save the project and diagnostics before any power cycle; cycling power resets buffers and counters and destroys the evidence you need.
  • For short events, lengthen how long the HMI holds system events on screen so comms faults stay readable, the approach in extending HMI system event display time to reveal comms faults.

For faults that come and go, capture the counters during the event, never after a recovery, the discipline applied in intermittent PLC connection loss diagnosis. Do the isolation with the machine in a safe state: pulling a communication cable or inhibiting a driver on a running process can change machine behavior, so bench-test or lock out first.

Worked example: where the milliseconds go #

The standard for RTU timing is the Modbus over Serial Line specification: it requires a silent interval of at least 3.5 character times between frames and recommends a fixed 1.750 ms interval at baud rates above 19200. At 9600 baud with 11-bit characters (start, 8 data, parity, stop), one character takes 11 bits ÷ 9600 bit/s = 1.15 ms, so the inter-frame gap is 3.5 × 1.15 = 4.01 ms, and a request/reply cycle pays it twice: 8.02 ms of mandatory silence.

Illustrative inputs, replaced by your own: a PLC reads two holding registers over Modbus RTU at 9600 baud, an 8-byte request and a 9-byte reply, the peer turns around in 30 ms, the controller services the port once per 10 ms scan, and the driver timeout is 500 ms.

  • Request on the wire: 8 bytes × 11 bits = 88 bits ÷ 9600 bit/s = 9.17 ms
  • Reply on the wire: 9 × 11 = 99 bits ÷ 9600 bit/s = 10.31 ms
  • Two frame gaps: 2 × 4.01 = 8.02 ms
  • Peer turnaround: 30 ms
  • Serial total: 9.17 + 10.31 + 8.02 + 30 = 57.5 ms
  • Worst case with one scan of servicing: 57.5 + 10 = 67.5 ms

Decision for these numbers: 67.5 ms against a 500 ms timeout leaves a 7.4 times margin. A 10 ms scan cannot be causing timeout faults on this link; look at wiring, addressing, the peer or the driver.

Same link, heavier controller: the program grows until the measured maximum scan is 300 ms with the port still serviced once per scan. Worst case is 57.5 + 300 = 357.5 ms, 71 percent of the timeout, and one slow peer answering in 100 ms instead of 30 ms pushes the total to 427.5 ms, 85 percent. Retries now trip the fault. Decision: execution load is the prime suspect, and the fix is to give communication its own task or a larger service slice, not to raise the timeout or lengthen the scan further.

The controlled scan-time test #

When evidence does point at execution timing, test it like an engineer:

  • Baseline the controller's current and maximum scan values from its own diagnostics, with the fault present.
  • Load a minimal program into a bench controller and compare update rates; if the small program restores fast updates, CPU load is the variable, and you can profile the real program section by section.
  • Change one factor at a time, with counter readings before and after over a fixed observation window, and restore the previous value if nothing improves. Stacked changes, scan plus timeout plus a power cycle together, prove nothing.
  • Weigh what a longer scan costs: delayed alarms and degraded PID sampling, and a machine that fires reject jets off an encoder or advances a shift register per pulse cannot absorb a padded scan at all.

What to decide for each case #

  • HMI values frozen, outputs running, and the transaction-plus-scan sum far below the timeout: a link, addressing or driver fault. Fix the path and leave the scan alone.
  • Programming tool dead while the HMI still updates: a transport problem on the programming path; on UDP-based programming links, check what the network does to that protocol specifically.
  • Remote I/O reports lost communications: remote I/O diagnostics and wiring. It is not a Modbus ticket until the counters say so.
  • One Modbus peer down: that peer and its cable segment. All peers down: the master's port, the trunk, or its servicing time.
  • The worst-case transaction plus one scan can reach the driver timeout: execution load. Restructure communication servicing, then re-measure.
  • The fault only clears on power cycle: capture the state first. A shrinking interval between forced cycles means a degrading cable or device, not a timing problem.

Questions asked

How do I decide quickly whether scan time is causing my HMI communication fault?

Put two numbers side by side: the worst-case transaction time including one scan of communication servicing, and your smallest driver timeout. In the worked 9600-baud example the total is 67.5 ms against a 500 ms timeout, which clears a 10 ms scan completely. If the same sum built with your measured maximum scan can reach the timeout, execution load is your prime suspect. Read the controller's current and maximum scan values rather than estimating them.

Why would increasing scan time ever appear to fix communication errors?

Because of time slicing. Some controllers service port buffers in a fixed slice of each scan and continue an overrunning task on the next scan, so a longer scan can hand that service more time and the symptom fades while the real cause, such as buffer starvation, marginal wiring or a failing peer, stays in place. Treat it as a hypothesis: one change, error counters before and after, and restore the previous value if the counters do not improve.

Does a working programming connection prove the HMI link is healthy?

No. The two are separate services. On platforms where the programming session travels over UDP, a network can pass TCP-based HMI traffic and still block the engineering tool, and one physical port can serve several protocols, as the BRX serial port does for Do-More Designer, Modbus RTU and K-Sequence. Each successful connection proves exactly one path for exactly that moment.

Is a remote I/O communications loss a Modbus fault?

Not unless the diagnostics say so. Read the remote I/O module's own communication status and watchdog behavior first, then check the scope: one peer failing points to that device and its cable segment, while an entire segment failing points to the master port, the trunk wiring or the master's servicing time. File the fault under the device class the counters actually name.

The fault clears when we power-cycle the PLC. Is that a fix?

It is evidence destruction, not a repair. The cycle resets buffers and error counters, so the fault's absence after reboot proves nothing, and whatever caused it is still fitted. Log the state and the interval between forced cycles before the pattern is lost: a shrinking interval points to a degrading cable, connector or peer device rather than controller timing.

Keep reading

  • Troubleshooting

    Why a CODESYS V3 HMI connection fails an encrypted PLC

    A network scan only proves the cable and the IP path. When the controller accepts only encrypted CODESYS V3 traffic, an HMI driver that has not implemented that encryption keeps reporting a connection error no matter how many times you import tags. Put the controller's two Ethernet interfaces on separate subnets, leave the 11740 gateway port alone, and fix the link at the driver level or move the visualization to hardware that speaks encrypted CODESYS.

    HMI and touchscreens

  • Troubleshooting

    Why an HMI Fails to Talk to an FX2n PLC Over 232-BD

    Moving a value into D8120 only sets the serial format — the link still fails on a wrong driver, an inactive PLC configuration or a miswired cable. Set the format once, through the PLC parameter settings in GX Works or GX Developer or one deliberate D8120 write, match the driver's framing at both ends, then prove the FX2N-232-BD cable pin by pin, in that order.

    HMI and touchscreens

  • Troubleshooting

    Diagnosing intermittent HMI to PLC Ethernet comms hangs

    Stop changing the topology. Put one packet capture where it can see the PLC-to-HMI unicast exchange — a mirror port or a tap, not a spare switch port — run it through at least three hangs with device logs on the same clock, set every panel update cycle to 1000 ms, and confirm the three devices hold unique IP addresses. Whether panel requests stop or PLC responses disappear decides which side you repair.

    HMI and touchscreens