Explainer
What macro polling of serial controllers costs in HMI refresh time
Short answer
A macro that polls N serial controllers spends, per refresh, the line time of every request and reply plus the full timeout once for each parameter that gets no answer. At 9,600 baud with two parameters per controller, four answering devices cost roughly 0.2 s; one silent device adds a second or more. Commission one address first, verify the float24 decode, then scale.

On this page
A macro that polls several serial controllers pays for every frame itself: one screen refresh costs the line time of each request and reply, plus the full reply wait once for every parameter that never gets an answer. Refresh time therefore grows in a straight line with the controller count while every device answers, and it jumps by one full wait per silent parameter when a device does not. With two parameters read from each controller over a 9,600 baud port, four healthy devices cost about 0.2 s per refresh; one powered-off controller stretches the same refresh to about 1.1 s. The order that keeps the number honest is fixed: commission one controller at a known address, prove the decoded values against the controller's own display, then scale the count with the sum below.
What a macro poll adds that driver tags don't #
When the panel's own device driver polls a controller, the driver owns the queue, the retries and the timeout, and the screen cadence is the driver's business. A macro that speaks a vendor's serial protocol does all of that itself, one request at a time, inside its own execution window. That is the only way to read parameters no driver profile covers, and it is exactly what one workable arrangement of this kind does: a Weintek panel project built in EasyBuilder 8000 v4.65.12 build 2014.04.17 polls a chosen number of temperature controllers and reads the process variable and the setpoint from each.
The cost of that freedom is ownership of the timing. The macro sends a request, holds the cycle until a reply or the wait expires, converts and stores the value, then addresses the next parameter. Nothing overlaps, so refresh time is a straight sum, and the slowest term sets the character of the whole number. If a link already shows timeout symptoms with driver tags, work through fixing an HMI-PLC communication timeout over serial before adding macro traffic, because a macro poll fails the same way — you just own the wait yourself.
The refresh time in words #
refresh = (controllers × parameters each) × (request time + reply time + gap and processing) + (unanswered parameters × reply wait)
- Request and reply time = characters × bits per character / baud. One character at 8 data bits, no parity and one stop bit is 10 bits, start and stop included.
- Gap and processing is the quiet interval the protocol wants between frames plus the macro's own work between them. Measure it once on the bench; it is small next to the frames and tiny next to a wait.
- The reply wait is how long the macro holds one cycle open before declaring it dead. It costs nothing while every device answers, and everything when one does not.
Two properties follow from the shape of that sum. Healthy refresh is proportional to the controller count, so doubling the count doubles the line time and nothing else. And the wait term ignores port speed entirely: a faster port does not shorten a wait that is already running.
What one silent controller costs #
The wait is the only term that can dwarf the rest. Take a 500 ms wait and a controller with two monitored parameters that drops off the line: each of its two cycles burns the full wait once per refresh, adding a full second of stall that no port upgrade removes.
The setting rule is the mirror image: the wait must stay above the slowest reply a healthy device produces, or good devices get declared dead. Measure that reply at the final baud rate and cable length, set the wait several times above it, and shorten it only if misses become routine. A station that receives every poll and answers none is its own diagnostic problem — one traced case is why an SLC 5/03 receives remote polls but sends no reply — and the refresh accounting is identical either way: it costs its parameters × wait per refresh until it is repaired or dropped from the poll list.
Commission one controller before scaling the count #
Staged commissioning separates the three failure modes — channel, decoding, scheduling — so each is proven where it appears.
- Bring up one controller at its known configured address: identical port settings at both ends, with the address read from the controller itself. The address selects the device and the parameter identifier selects the value inside it; keep both straight in the request the macro builds.
- Poll that one controller and check the numbers before trusting the link. Each value arrives as float24 — 3 bytes holding a sign bit, an exponent and a significand, assembled in the byte order the controller actually sends. Copying raw bytes into the uint16 destination yields a plausible-looking wrong number, not an error. Compare the decoded PV against the controller's front-panel reading under steady conditions, compare SP against its setpoint, then repeat at a second operating point to catch a sign or scale error. One safety note: prove this on a bench or with the loop in manual, because a mis-decoded displayed value can invite a wrong manual adjustment.
- Only now extend the address list. Each added controller takes a distinct address and every reply is stored against the address that answered it — the same bookkeeping as where an HMI gets Modbus addresses on a shared RS-485 bus.
Timing four controllers with two parameters each at 9,600 baud #
Inputs, and where each comes from:
- 4 controllers, 2 parameters each (PV and SP), so 8 request/reply cycles per refresh — the two-parameter count is the arrangement's own reading pattern.
- Port at 9,600 baud, 8-N-1, so 10 bits per character — an example port setting; substitute the real one.
- 8-character request and 11-character reply, the reply carrying the 3-byte float24 value plus address, command and checksum characters — example frame sizes; count the real frames from the protocol documentation.
- 5 ms of gap and processing per cycle — example allowance.
- 500 ms reply wait — example setting.
The rule in words: every answering parameter costs its request time plus reply time plus the gap; every silent parameter costs the full wait instead of its cycle.
The arithmetic:
- Character time: 10 bits / 9,600 bits per second = 1.042 ms.
- Request: 8 characters × 1.042 ms = 8.3 ms. Reply: 11 characters × 1.042 ms = 11.5 ms.
- One healthy cycle: 8.3 + 11.5 + 5 = 24.8 ms, call it 25 ms.
- All four answering: 8 cycles × 25 ms = 200 ms, about 0.2 s per refresh — the display tracks values roughly five times per second.
- Controller 3 powered off: 6 healthy cycles × 25 ms = 150 ms, plus 2 silent parameters × 500 ms = 1,000 ms, for 1,150 ms or about 1.1 s — roughly six times the healthy refresh, most of it spent waiting.
The decision: with every device answering, scaling is safe up to the process's staleness budget — at these numbers the line carries about 40 parameter cycles, or 20 controllers at two parameters, before healthy traffic alone reaches a second. With one device down, the wait dominates: cutting that device's wait to 100 ms drops its cost from 1,000 ms to 200 ms per refresh and still leaves about nine times the 11.5 ms reply as margin. Repair, skip or shorten — never leave a full-length wait running against an absent address.
What moves the number #
- Port speed: at 19,200 baud a character takes 0.52 ms, the cycle falls to about 15 ms (4.2 + 5.7 + 5) and the four-controller refresh falls to about 0.12 s. The wait term does not move.
- Parameter count: reading one value per controller instead of two halves the cycles; the controller count multiplies them in a straight line.
- Shared trunk: RS-485 defines the electrical layer, not who transmits when. Any mix of protocols shares one trunk when every exchange is one poll answered by one response and only one station transmits at a time; token-passing schemes cannot. A macro poll is poll/response by construction, so it can share a trunk under that discipline — give it a port of its own where the panel has a spare, or sequence it against the driver's traffic. Two masters transmitting without that discipline produce exactly the pattern in the Modbus timeout caused by a PLC master-slave conflict.
- The wait: absent while all answer, dominant when one does not. Nothing else in the sum swings by an order of magnitude in normal operation.
The decision for each case #
- All controllers answer and the computed refresh sits inside what the process tolerates as staleness: scale the count. The number grows linearly, and the bench-measured single-controller cycle is the constant that predicts it.
- A controller can drop out in service: budget silent parameters × wait into every refresh, set each wait to a measured multiple of the slowest healthy reply, and skip an absent address rather than stall every cycle on it.
- The parameters are invisible to the panel's drivers: macro polling is the right tool — own the sum, commission one address first, and prove the float24 decode against the controller display before trusting any number of them.
Questions asked
Does converting float24 to uint16 slow the refresh down?
No, not meaningfully. The conversion runs on bytes the panel has already received, so it costs processing time only, and that stays far below the serial frame times. Refresh time is set by the frames on the wire and by the wait you allow for a reply; a silent controller costs the full wait once for each of its parameters, every refresh.
How many controllers can one macro poll before the display goes stale?
Work it from the per-cycle time, not from a fixed count. At the example's 25 ms per parameter cycle, 20 controllers with two parameters each already put about a second of healthy line traffic into every refresh. The honest limit is the staleness your process tolerates, plus one full wait for every parameter whose controller fails to answer.
What should the macro's reply wait be set to?
Above the slowest reply a healthy controller produces, measured on the bench with the final baud rate and cable. At the example numbers a reply occupies about 11 ms of line time, so a 100 ms wait leaves roughly nine times the margin. Shorten the wait if missed devices become common, because every miss costs the whole wait once per parameter.
Can macro polling share an RS-485 trunk with other devices or protocols?
RS-485 defines only the electrical layer, not who may transmit. Any mix of protocols can share one trunk when every exchange is a poll followed by a single response and only one station transmits at a time. Sequence the macro against any other master on the line, and give each controller a distinct address so replies can be matched to their requests.
Why verify the decoded values against the controller's own display?
A float24 value carries a sign bit, an exponent and a significand in 3 bytes, and the byte order can differ between implementations. A reply that passes its checks still decodes to a wrong but plausible number if the macro assembles the bytes in the wrong order or reads the wrong field. Matching the controller's front-panel reading at two operating points proves both the link and the conversion.


