HMI message priority scan order: use explicit arbitration

7 min read · Published November 14, 2026

When two alarm conditions are true at once, the panel shows whichever message assignment the PLC executed last, so priority ends up encoded in rung position. Rank the conditions, arbitrate them in one PLC section that drives the message register, and verify with a two-trigger test.

When two alarm conditions are true at the same time, the panel message display shows whichever message assignment the PLC executed last in its scan. A scan runs top rung first, typically every 10 to 50 ms on a machine this size, so the last write is the one that sticks. That makes rung position the priority system, whether anyone meant it to be or not. It keeps working until someone adds a rung at the bottom of the program or moves an existing one, and then the milder message wins with no alarm change at all.

What this article gives you

The durable fix lives in the PLC: rank the message conditions from most severe to least, check them in that order in one arbitration section, and drive the message register from that single point. After that, the displayed message follows the ranking you wrote down, and the same message appears from any rung order. This article gives the checks that prove scan order is deciding the display, the arbitration logic, and the two-trigger test that verifies the result in about 5 minutes per pair.

Why the last assignment in the scan wins

A PLC evaluates its program in order, top rung first, once per scan. When two active conditions each write the message number the panel reads, the rung that executes later overwrites the earlier one, and the value left in the register at the end of the scan is what the panel shows, typically within 100 ms on a panel polling at a 10 Hz update rate. That is the same last-rung-wins rule that produces duplicate-output faults on internal tags. The write-order question shows up between devices too: with two HMI panels writing to one PLC, the last writer wins. On a single message display, the consequence is that the priority lives in program layout, so moving or adding a rung changes which message the operator sees.

Symptoms and what each points to

  • The most important message shows only while its rung sits last in the program. The ranking lives in program layout.
  • The wrong message appeared after a logic edit that never touched an alarm rung. An added or moved assignment changed which write executes last.
  • Two conditions are on and the milder message shows within a scan or two, under 100 ms at a 20 ms scan time. There is no arbitration; the later rung decides.
  • A message stays on screen for 10 s or more after its condition cleared. Another rung still writes the register late in the scan, or the condition latches.
  • Operators expect a running list of active alarms and the object shows one line. It is a single message display, and the PLC can hand it only one number.

Single message display or retained alarm list

Decide which object the screen uses before you change logic. A single message display shows one line: whatever number the PLC hands it. A retained alarm list holds several active alarms and sorts them by its own configuration. Panel software documents that sorting: alarm classes group conditions, and where the manual provides it, a priority range is mapped to each class on the alarm configuration screen. If the goal is a ranked list on screen, that mapping is where to look, and why a panel alarm priority does not carry to every screen covers the screen-to-screen side. Reordering rungs in the PLC will not change how a retained list sorts. If a condition is already active when the panel connects and the list misses it, gate the bit in the PLC. The arbitration below is for the single display that must pick one message.

Checks before you change anything

  1. Pick two conditions that can be true together and differ in severity. Force the bits or work with the machine stopped; a display test must never create a real hazard. A condition that must stop the machine belongs in the interlock logic, not only in a message on screen.
  2. Turn both conditions on. After 2 s, read the message register in the data table and note its value. Note the rung positions of every write to that register.
  3. If the register holds the number from the later rung, scan order is deciding the display. If it holds a number you did not expect, a third write exists somewhere, so run the cross-reference on the register first.
  4. Clear the more severe condition and watch the handover to the milder one, which should land inside 1 s. Clear both and confirm the display reaches its no-message state within 2 s with no stale text left.
  5. Confirm the panel link stayed healthy through the test; a PLC heartbeat counter separates a logic problem from a comms problem.

The fix: one arbitration section

  1. List every condition that can drive the displayed message and rank it with the operations team, rank 1 the most severe. Write the ranking beside the logic on the drawing. For a plant with a few dozen messages, this meeting takes about 30 minutes.
  2. Build one section that checks the ranking in order: the rank 1 rung first, then rank 2, with each lower rung conditioned on every higher condition being off.
  3. Let that section write the message register, and remove every other write to it. The cross-reference should show the arbitration section as the only writer.
  4. Keep the message numbers themselves unchanged, so the panel project needs no edit.
  5. Add every future condition inside this section, never as a separate write elsewhere in the program.

The smallest version of PLC-chosen text is two text states from one PLC bit; the ranked section is that idea stacked in severity order. If scan order was used to restore production in a hurry, mark it in the rung comments as order-dependent, so the next editor knows the layout carries the priority.

Recommendation: build the arbitration section in any program where two or more message conditions can be true at once. Keep the last-rung arrangement only as a temporary restore, marked in the rung comments, and replace it before the next logic edit.

Worked example: 100 ranked conditions, three active

Inputs. The plant has 100 conditions that can each drive the displayed message, ranked 1 to 100 with rank 1 the most severe, and the scan runs every 20 ms. That ranking is the list you write with the operations team; nothing in the panel assigns it. Three conditions are active in the test: rank 7, a drive fault; rank 23, low air pressure; rank 88, a batch count reached. The 1-to-100 scale is the plant's own ranking, and the three active ranks are the test case.

Rule. The display must show the most severe active condition, so the arbitration checks ranks in ascending order, writes the first active rank's message number, and conditions every later rung on all higher ranks being off.

Arithmetic. Rank 1: off. Ranks 2 through 6: off. Rank 7: on, so the section writes message 7 and skips ranks 8 through 100. Seven checks executed and 93 skipped, and 7 + 93 = 100. All of that resolves inside one 20 ms scan, so the panel shows message 7 within about 100 ms at a 10 Hz polling rate. The lower active ranks never reach the register: the smallest active rank is min(7, 23, 88) = 7.

Result. The panel shows the drive fault message, wherever the three rungs sit in the program and however many lower conditions are also on.

Handover. Clear rank 7 while ranks 23 and 88 stay on: within 2 s the checks reach rank 23 and the register takes message 23. Clear ranks 23 and 88 as well: the section finds no active condition and the display returns to its no-message state.

Decision. Rank 1 beats the other 99 by construction, and the lowest active rank number always wins. Verifying every pair would take 100 x 99 / 2 = 4,950 two-trigger tests, which no one runs. Test rank 1 alone, rank 1 against each lower condition it can genuinely coincide with on this machine, and one full all-clear. Each two-trigger test is about 5 minutes, so a machine with 12 coincident pairs is roughly a 1-hour sign-off. Every condition added later gets a rank and one rung in the same section.

Sign-off tests

Run these with the machine in a safe state, record the results, and allow 15 minutes for the full set on a small machine.

  • Each ranked condition on its own: its message appears within 1 s.
  • Each pair that can occur together on this machine: the higher rank stays displayed while both are on and hands over on clear within 2 s.
  • All-clear: the display returns to its no-message state.
  • One repeat after the next logic edit that touches message rungs: the ranking, and only the ranking, decides.

Questions

Can I give each alarm its own priority number in the panel project?

For a single message display driven by a register, no. The panel shows whatever number the PLC leaves in the register, and there is no per-message priority field for it to apply. A ranked retained alarm list is a different object: where the panel software documents priority mapping or class sorting, configure the list there and keep the PLC arbitration for the single line. Check the panel software's alarm documentation for which object your screen is using.

How do I find every rung that writes the message register?

Use the cross-reference or where-used search in the PLC software on the register address. It lists every rung that reads or writes it, including the forgotten one at the bottom of a subroutine. With the machine stopped, force two conditions and watch the register in the data-table monitor; the value present at the end of a scan, refreshed on screen within about 100 ms of panel polling, is the one the panel shows.

What happens when someone adds a new message later?

With arbitration, the new condition gets a rank and one rung inside the arbitration section, and the ranking note on the drawing gains a line. Budget about 10 minutes: one rung, one comment, one drawing line. Without arbitration, the new rung's position silently decides priority. That is the failure mode of the last-rung arrangement: an unrelated edit changes which message operators see first, with no alarm change at all.

Should the panel show several active alarms at once?

That is a design choice, and the two objects behave differently. A retained alarm list holds several alarms and sorts them by its documented configuration. A single message display shows exactly one line, so the PLC must choose. Many plants run both: the list for history, and the arbitration-driven line for the one message that must always be readable at the machine.

Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.

Keep reading

Build your signAsk for a quote