Why RUN=1 Does Not Mean the Equipment Is Running
Turning RUN, FAULT, AUTO and COMM bits into one operational state: the precedence rule, the ISA-18.2 alarm state model, SEMI E10 and E30 state models, and a hands-on test sequence.
The screen said RUNNING for twenty minutes after the pump stopped
The night log has one line: 03:14 PUMP-101 RUNNING. Nothing after it. In the morning the pump turns out to have stopped at 03:12. Communication to the PLC dropped at 03:12, and the screen held the last RUN=1 it ever received for twenty minutes.
That is not an alarm configuration problem. It is a state expression with COMM left out of it. This is where most of the time goes.
Decide precedence before you write the expression
RUN, FAULT, AUTO and COMM are four bits on their own. When you turn them into one line an operator reads, the first thing to settle is not the combination logic — it is precedence. The order I use:
COMM=0→ Communication fault. Ignore every other bit and mark the values stale.FAULT=1→ Faulted / stopped. Fault wins even when RUN is still 1.RUN=1→ Running.- Otherwise → Auto standby or Manual standby, depending on
AUTO.
COMM goes on top for a simple reason: what stays on the screen after a link drops is not data, it is memory. OPC UA was designed to carry that separately from the value, in the StatusCode (OPC UA Part 4 defines StatusCode; Part 8 covers data access quality). When quality is Bad, the value is something to discard, not something to display. If your gateway drops quality and writes only the value into the tag, that gateway is the cause of this outage.
Put a number on the COMM decision too. I use three times the poll period: a 1 s poll drops COMM after 3 s of silence. One times the period raises a communication fault every time a packet slips. Ten times means the screen lies for ten seconds after the equipment stops.
Fault wins, and it does not clear instantly
RUN=1 AND FAULT=1 is common — the motor contact is still closed at the moment the overload bit comes up. Showing both leaves the operator with nothing to act on. Let fault win.
The reverse matters more: do not return the state to normal the moment FAULT drops. The alarm state model in ISA-18.2-2016 (also published as IEC 62682) splits the exit path in two — acknowledged then returned to normal, and returned to normal but still unacknowledged (RTN Unacknowledged). That second state exists in the standard precisely so a fault that came and went while nobody was looking does not vanish from the display and survive only in the log. The same standard keeps Shelved, Suppressed by design and Out of service as separate states, which means a suppressed alarm must not be drawn the same colour as a normal one.
Chatter is handled with delays. ISA-18.2 names deadband and on/off delay as the tools for suppressing duplicate alarms. I put a 3 s on-delay and a 30 s off-delay on FAULT. The long off-delay is the part that matters — at 3 s/3 s a bouncing contact fires the alarm ten times.
The reason to care: EEMUA 191 puts the long-term target at an average of one alarm per operator per ten minutes, which is 144 a day. One chattering tag spends that entire budget by itself.
The alarm-side detail is in alarm delay and debounce timers and alarm latching, reset and acknowledgement.
In semiconductor, the state model is already written down
Before you invent a state list, check one thing. If the equipment follows SEMI standards, the model already exists, and the moment you use your own names you stop agreeing with the host/MES.
- SEMI E10 defines equipment condition as six basic states: Non-Scheduled, Unscheduled Downtime, Scheduled Downtime, Engineering, Standby, Productive. Utilisation metrics are computed on top of those six.
- SEMI E30 (GEM) splits the communication state into DISABLED and ENABLED, and ENABLED again into NOT COMMUNICATING and COMMUNICATING. That is where the COMM bit above belongs.
- The E30 control state is OFF-LINE or ON-LINE, and ON-LINE is again LOCAL or REMOTE. Mapping the screen's "manual/auto" straight onto that axis is wrong. Not being in REMOTE means host commands get rejected; it does not mean the equipment is in manual operation.
Miss that distinction and a host remote command comes back with HCACK=2 while nobody can say why. That case is written up in S2F41 HCACK 2 and GEM control states.
A test sequence worth running by hand
Reading the concept does not make it stick. Bring up a small live example and break it in order. The StateX tutorial is a minimal screen — one temperature signal, a low/high alarm band, a heater switch, an event log — which makes it a convenient rig for this.
Skip the happy path. Start with the exceptions.
- Cut communication. Does the state change to communication fault, or does the last value sit there? Are the values marked stale?
- Restore communication. Does the gap stay a gap in history, or does the trend draw a straight line across it? If it draws the line, that trend is useless for a later root-cause review.
- Raise FAULT and drop it one second later. Is there an event? Does the display clear immediately?
- Set RUN and FAULT to 1 at the same time. Which one is shown?
- Switch manual/auto. Do the state text and the enabled command buttons ever contradict each other?
- Is the state transition timestamped in history? If so, is that the equipment clock or the server clock?
Step 6 catches a lot of sites. The state is right, the timestamp is server-side, and the alarm order no longer matches the trend order.
Priority is a number first and a colour second
Once the state exists it needs a priority. Severity in the OPC UA alarms and conditions model (Part 9) is an integer from 1 to 1000. Exposing that whole range on a screen helps nobody. ISA-18.2 asks you to collapse it to three or four priorities and to set a target distribution across them. I hard-code three — 1000, 500, 100 — and refuse to create values in between. Allow a 700 once and there are nine priorities a year later.
Colour comes last. Choose colours before the priorities are defined and "how many red things there are" becomes the priority scheme.
What to check next
If the state expression behaves, the next question is how many lines each transition writes to history. Four events per single state change is a reporting problem, not an expression problem. Where to draw that line is covered in from SCADA signals to operational state.