IMDTouchKnowledge BaseShop main store

Troubleshooting

Why HMI pages lag with many PLC variable bindings

HMI and touchscreens Published 8 min read

Short answer

The lag is acquisition workload, not the processor. On this target each @PLC.variable binding becomes its own Modbus message, so a 140-variable alarm page needs 3.4 to 3.9 s of wire time per full sweep at 9600 baud. Keep direct bindings to roughly 40 values per page for a one-second sweep, and move denser pages to programmed grouped reads into display globals.

On this page
  1. What each @PLC.variable binding costs on the wire
  2. Telling acquisition lag from a communication fault
  3. Confirming the cause on your own pages
  4. Acquisition time for a 140-variable alarm page at 9600 baud
  5. Cutting the variable count on direct-bound pages
  6. Programmed grouped reads into display globals
  7. The decision for each case
  8. Questions asked

The lag is not the touchscreen processor, and it is not the RS-485 link failing: it is the number of remote reads the page forces. On this class of target, every @PLC.variable binding on the visible page is resolved as its own Modbus message, so an alarm page holding 140 bound values (two sets of 70) demands 140 request and response cycles on a bus that carries one transaction at a time. At 9600 baud that is 3.4 to 3.9 s of wire time for one full sweep, before driver overhead and retries. The clock-adjust page is fast because it asks for almost nothing. The fix is fewer PLC-bound values per page, or programmed grouped reads into display globals, and the first of those is field-confirmed.

What each @PLC.variable binding costs on the wire #

The touchscreen runs as the Modbus master and the controller is the only slave, so nothing competes for the bus. That removes contention from the explanation but not cost: every transaction still pays for the request frame, the silent turnaround interval, slave processing, the response frame, and handling by the display runtime. Those costs are per variable, and they add.

The controller's built-in monochrome display never crosses a serial link; it reads controller memory directly, which is why the identical alarm page is instant on it. Porting the screens preserved the presentation and added a serial hop for every value shown. A 120 MHz-class processor governs rendering and local logic, and it cannot shorten 140 serial transactions, so clock speed is the wrong variable to compare between the two displays.

A set such as Set_AlarmsName or Set_AlarmsStatus organizes screen content in the editor. Membership in a set does not place those variables at consecutive controller addresses, so the runtime cannot merge them into one read: 70 variables in a set are still up to 70 separate messages.

Telling acquisition lag from a communication fault #

Read two things separately on every page: how quickly a touch is acknowledged, and how quickly the displayed PLC values change. A delayed value update with usable touch response points at data acquisition; a display that is slow to acknowledge touches can simply be spending its time servicing that acquisition. Then classify what you see:

What you observe What it means Next check
Simple pages respond fast, dense pages lag Per-page acquisition workload Reduce PLC-bound values, then group reads
Every page shows stale or frozen values A fault affecting all reads, not workload Failed requests, retries and timeouts in diagnostics
Objects with no PLC binding are also slow Rendering or screen logic Object count, animations, script load
Lag falls when bindings are removed Acquisition confirmed as the cause Fewer values per page or grouped reads
One value wrong while the rest refresh A binding or mapping fault Data type, register address and mapping for that tag

If every page goes stale, stop tuning page contents: work through fixing an HMI PLC communication timeout over serial or an HMI Modbus device that gives no response over RS-485 first. When you test, record refresh behavior and communication errors at the same time, so retries are not mistaken for normal polling overhead.

Confirming the cause on your own pages #

  1. Open the simplest page, the clock-adjust page in this case, and note touch acknowledgment and value refresh separately.
  2. Open the dense page and record the same two observations.
  3. Halve the PLC-bound values on the dense page by removing or hiding objects, keeping navigation and the remaining object count comparable.
  4. Repeat both observations. Responsiveness that tracks the bound-value count confirms acquisition workload.
  5. If it does not track, pull the communication diagnostics and verify the serial settings against the controller before changing the architecture.
  6. Restore values in groups and find the count where refresh stops being acceptable; that count is your per-page budget.

The halving test is what turns a suspicion into evidence, the same standard that decides when a fishbone cause becomes the answer to Why #1 in a 5-why.

Acquisition time for a 140-variable alarm page at 9600 baud #

Inputs, each with its source:

  • 140 PLC-bound values on the page: two sets of 70, the field case.
  • 9600 baud with 8N1 framing, 10 bits per character: the common default and the baseline used in reported RS-485 timing.
  • One 16-bit register per binding: an 8-byte request and a 7-byte response under standard Modbus RTU framing.
  • A 3.5-character silent interval on each side of the exchange, as Modbus RTU requires.
  • 1 to 5 ms of slave processing: the range reported for typical slaves.

The rule in words: page acquisition time equals the number of bound values times the per-transaction time, and the per-transaction time is the request plus the response plus both silent intervals plus slave processing.

The arithmetic:

  • Character time: 10 bits at 9600 bit/s = 1.04 ms.
  • Request: 8 characters at 1.04 ms = 8.3 ms.
  • Response and the combined silent intervals: the response is 7 characters and both silent intervals together are 7 characters, so each costs 7 characters at 1.04 ms = 7.3 ms.
  • One transaction: 8.3 + 7.3 + 7.3 + 1 to 5 = 24 to 28 ms.
  • Full page: 140 transactions at 24 to 28 ms = 3.4 to 3.9 s per sweep.

Cross-check against measurement: reported field timing puts a 10-register transaction at roughly 50 to 100 ms at 9600 baud once driver overhead is included, which would put this page at 7 to 14 s. Treat 3.4 s as the floor your measured sweep sits above, and remember that values longer than 16 bits, such as 32-bit reals or text, lengthen the frames and push the total higher.

Decision: at about 25 ms per transaction, a one-second sweep holds for 1000 ms divided by 25 ms = 40 bound values. Above roughly 40 direct bindings per page at 9600 baud, split the page or move acquisition into the program. Grouping pays at once, because Modbus allows up to 125 holding registers in one read: the 70-value set that costs 70 transactions at 25 ms, about 1.75 s, becomes a single transaction with a 145-byte response, 8.3 + 151 + 7.3 + 1 to 5, about 0.17 s. Both sets together land near 0.34 s of wire time, about ten times faster, provided the addresses are contiguous.

Cutting the variable count on direct-bound pages #

The field fix was exactly this: limiting the variables per page made the alarm page responsive. Split the alarm presentation across pages, such as active alarms, history and detail, and hold each page inside the budget the halving test gave you. On read/write sets the direct syntax survives only while the page shows few parameters, because a write pays the same transaction cost as a read.

One caution: when you split an alarm page, keep active alarms annunciating on whatever page the operator lands on. A faster page that hides a running alarm is not an improvement.

Some runtimes expose the basic cycle that polls the visible page's variables; Siemens documented for ProTool that shortening it shortens response because the area is polled more often. That helps a light page. On a dense page a shorter cycle mostly re-queues the same backlog, so reduce the count first and tune the cycle second.

Programmed grouped reads into display globals #

When a page must stay dense, take acquisition out of the bindings. On this target, a global variable defined in the Display part is usable by both the program and the screen, so screen objects bind to a local global that the program fills over Modbus. Start by decoding the Modbus holding register address convention for every value on the page, then:

  1. Map each value to its controller address and sort the values into contiguous groups inside the 125-register request limit.
  2. Define the display globals that will hold the returned values.
  3. Replace the direct @PLC.variable bindings on the screen objects with bindings to those globals.
  4. Program the read sequence as a CASE stepping through one grouped read at a time, one implementation advancing every 0.5 s, handling completion and failure before it advances.
  5. Trigger writes from a display action, track completion or failure so an unsuccessful write is not silently lost, and read the controller value back before presenting it as confirmed.

Keep one outstanding transaction at a time; overlapping requests on a shared pair of wires creates your own collisions. The 0.5 s rotation is a scheduling interval, not a refresh guarantee, and with both 70-register groups finishing well inside it, the whole page completes within each rotation.

The decision for each case #

  • A page shows up to about 40 PLC-bound values at 9600 baud: keep direct @PLC.variable bindings; the full sweep lands near one second.
  • The page must show around 140 values: program grouped reads into Display globals; two 70-register groups cost about 0.34 s of wire time.
  • Every page, simple ones included, shows stale values: you have a link, request or timeout fault, not a workload problem.
  • The lag survives removing every PLC binding: the workload is rendering or screen logic, so cut objects and animations rather than variables.
  • Faster serial settings are on the table: wire time scales inversely with baud, but 140 direct bindings still cost one to one and a half seconds per sweep at 38400 baud, so group first.

Questions asked

Is the lag caused by the touchscreen processor?

No. The 120 MHz-class processor governs rendering and local logic, and the delay tracks the count of remote values the page requests. The controller's built-in display reads the same variables straight out of local memory with no serial hop, which is why it shows the identical alarm page instantly. A faster panel does not shorten 140 serial transactions.

How many PLC-bound variables can one page carry at 9600 baud?

Work it from the transaction time: a single-register read costs 24 to 28 ms on the wire at 9600 baud with 8N1 framing, so a one-second full sweep supports about 40 bindings. Systems that add driver overhead per transaction land nearer 50 to 100 ms each, which drops the budget to 10 or 20 bindings. Above your measured budget, split the page or group the reads.

Does raising the baud rate fix it?

It helps in proportion but does not make 140 direct bindings feel instant. Wire time scales inversely with baud, so going from 9600 to 38400 cuts the serial portion of each transaction about fourfold; with slave processing included, each binding still costs roughly 7 to 11 ms, and 140 of them need one to one and a half seconds per sweep. Treat a baud change as the supporting fix, with grouping as the main one.

Can I keep the @PLC.variable syntax on pages that also write?

Yes, within a limit. On read/write sets, keep the direct syntax only while the page shows few parameters, because each write pays the same transaction cost as a read. Once a page must display tens of values plus writes, switch that page to programmed acquisition with a display-triggered write, and track each write's completion so a failed one is not silently lost.

What does the 0.5 second read rotation actually buy me?

It is a scheduling interval, not a page refresh time. A CASE that starts a different grouped read every 0.5 s keeps one outstanding transaction at a time, and with two 70-register groups finishing in about 0.34 s of wire time, the whole page completes inside each rotation. The operator sees a full page within about half a second of arriving on it, plus display update time.

Keep reading

  • Troubleshooting

    Displaying a PLC Real Value Over Modbus on an HMI

    An INTEGER display that reads the register proves the link, station and address, so a blank REAL display is a 32-bit mapping fault. Declare the HMI variable as a 32-bit float on the register pair (40064/40065), set the device double-word order to Low Word First to match the PLC, and give the numeric field six integer digits for 628402.0.

    HMI and touchscreens

  • How-to

    Adding a Modbus RTU Driver and External Variables in Vijeo Designer

    Add one Modbus RTU equipment driver on the HMI serial port, set the baud, parity and stop bits every slave shares, and give each device a unique slave address. Then create one external variable per value, pointing it at that device and its documented register with the matching data type. Mismatched serial settings or duplicate addresses show up as read timeouts, so commission one device at a time.

    HMI and touchscreens

  • Troubleshooting

    Why HMI Indicators Stay Off Over Modbus RTU Polling

    Indicators on internal tags animate from HMI memory with no serial traffic; an indicator bound to a PLC tag needs a completed Modbus RTU read of the right address in the right data area. Confirm the PLC bit changes, then read the request and response, then fix the address at one known point.

    HMI and touchscreens