← Articles
SCADA Basics/6 min read/— views

Why a Disconnected Machine Still Shows 'Running' on Your SCADA Screen

A Run bit is a signal; 'running' is a state you decided. Using NAMUR NE 43's 3.6 mA, OPC UA StatusCode severity, SEMI E10's six equipment states and ISA-18.2's alarm states to get the priority right.

StateXOperational IntelligenceTagsAlarmsModbusHMI

The moment one bit starts lying

A machine with an unplugged Ethernet cable read "Running" on the HMI for 40 minutes. SCADA was still holding the Run=1 it got from the last successful response. The tag value was not wrong. What was wrong was the meaning we had attached to it.

Run, Fault, Auto and CommBad are signals. "Faulted stop", "manual standby" and "comms lost" are states. The equipment gives you the signal; you decide the state. When that boundary is not written down anywhere, the screen, the alarm list and the shift report start telling different stories — and the culprit is usually not the PLC.

Read quality before you read the value

The first input to a state decision is not the value. It is whether the value can be trusted. Each protocol answers that differently.

  • OPC UA: StatusCode is a 32-bit value whose top two bits carry severity — 00 Good, 01 Uncertain, 10 Bad. The numeric code table lives in OPC UA Part 6 Annex A and the semantics in OPC UA Part 4 (StatusCode); the data-access rules are OPC UA Part 8. Bad_NoCommunication and Uncertain_LastUsableValue both mean "a value came with this, and you must not use it as fresh" — a distinction that disappears the moment a client reads only .Value.
  • 4-20 mA: NAMUR NE 43 fixes the numbers. 3.8–20.5 mA is the measuring information range; at or below 3.6 mA, and at or above 21.0 mA, the signal is failure information. Those two numbers are why a broken wire should arrive as a fault rather than as 0 %. Scale it blindly and it becomes 0.0 °C, which is a plausible reading and therefore a state decision you never get to make.
  • Modbus TCP: there is no quality field at all. An FC3 response carries register values and nothing else (Modbus Application Protocol V1.1b3 §6.3, 1 to 125 words per request), so the client has to manufacture quality. The raw material is the time of the last successful response, the count of consecutive timeouts, and the exception code — 0x0A is Gateway Path Unavailable, 0x0B is Gateway Target Device Failed To Respond. Folding 0x0B into "comms fine, value 0" was the actual bug in the case above.

If quality is not promoted into a state of its own, everything downstream is built on sand.

Priority is the whole design

The combination rule fits on one card. Evaluate top-down and show the first match only.

  1. Bad quality / comms lost
  2. Safety stop, interlock active
  3. Faulted stop (Fault)
  4. Normal stop / idle
  5. Running

You cannot know whether a machine with no comms is running. Writing "Running" for something you do not know is a guess, and the guess lands in the downtime figures unlabelled. Put those five lines in the tag design document and the screen and the report finally agree.

Mode is a second axis, not a state

Mix Auto/Manual into the run state and you lose the ability to express "comms are fine but the remote command is refused". SEMI E30 (GEM) keeps them as two separate state machines for exactly this reason. Communication State answers whether messages are flowing (DISABLED / ENABLED, with NOT COMMUNICATING and COMMUNICATING inside it); Control State answers whether the host is allowed to command (EQUIPMENT OFF-LINE / ATTEMPT ON-LINE / ON-LINE LOCAL / ON-LINE REMOTE). A host can establish communication with S1F13 and still have every remote command rejected because Control State sits at ON-LINE LOCAL. An HMI that collapsed the two axes into one will show that as "comms fault".

Where the equipment has two axes, keep two on the screen. Merging them deletes information.

The downtime state names already exist

Before inventing state names, look at SEMI E10. It divides equipment time into six basic states: Non-Scheduled Time, Unscheduled Downtime, Scheduled Downtime, Engineering Time, Standby Time and Productive Time. Map your own states onto those six and availability and OEE come for free; two years of data collected under a private taxonomy will not retrofit. Reporting those states to a host over SECS messages is defined by SEMI E58 (ARAMS).

Alarms are the same story. ISA-18.2 defines the alarm state machine as Normal, Unacknowledged, Acknowledged, Return-to-Normal Unacknowledged, Shelved, Suppressed-by-design and Out-of-service. OPC UA Part 9 expresses the same model as AlarmConditionType with ActiveState, AckedState, ConfirmedState, SuppressedState and ShelvingState (Unshelved / OneShotShelved / TimedShelved). Collapse Active and Acked into a single bit and the "cleared but nobody looked at it" alarm vanishes — which is the one state a shift handover actually needs.

The load figure is standardised too. The EEMUA 191 table and the equivalent annex table in ISA-18.2 treat one alarm per 10 minutes — roughly 150 per operator per day — as acceptable, and 300 per day as already unmanageable. Use that as the budget when you decide which states deserve to become alarms.

A transition timestamp is never better than the poll rate

"Log the state transition time" is common advice. Writing down its limit is rare. At a 1 s poll, any stop shorter than 1 s is invisible and every transition time is quantised to a poll boundary. That is how a 2-second stop becomes either 0 or 2 seconds in the report.

If the interval has to be accurate, the PLC has to stamp it. Read an equipment-side counter or timestamp register in the same response and treat the SCADA receive time as secondary. Changing this later means touching the report queries and the historical data together, so it is much cheaper to decide before commissioning.

Try it on something small

Following one signal all the way to a state is faster than reading about it. Try a Live Operational State Tutorial walks a single temperature signal into an alarm decision, a heater output, a visual state and an event log. To see the two GEM axes in real bytes, send S1F13 and then S1F17 yourself against the SECS/GEM simulator — it explains the distinction faster than prose does. StateX is the same idea built out on the product side.

Next time you add a state, there is one question worth asking: when this state is wrong, who notices, and how long does it take?