Skip to content

26Industrial patterns

Alarm management to ISA-18.2: delay, deadband, latch, acknowledge, first-out

What makes an alarm industrial rather than a comparison: an on-delay that kills chatter, deadband on the return, latching, acknowledge, first-out and priority, and why too many alarms is itself a hazard.

Lesson 26 of 3414 minIEC 61131-3

An alarm is not a comparison

Plenty of programs contain HiAlm := Level > 80.0; and call it an alarm. That is a comparison. An industrial alarm, per ISA-18.2 (and IEC 62682), has a lifecycle: condition, delay, active, latched, acknowledged, returned, cleared. Every stage is there for a reason.

The on-delay kills chatter

A real analogue signal is noisy. If the level sits around 80%, a bare comparison produces hundreds of alarms a minute. An on-delay demands that the condition persist before it is believed:

HiDly(IN := Level >= 80.0, PT := T#2s);
HiAct := HiDly.Q;

Two seconds removes wave slosh in a tank. It does not remove an overflow.

Deadband on the return

The delay protects the way in; deadband protects the way out. In at 80%, out at 75%:

IF Level >= 80.0 THEN
  HiRaw := TRUE;
ELSIF Level <= 75.0 THEN
  HiRaw := FALSE;
END_IF;

Common practice is 2 to 5% of span. Without deadband you throw the delay away, because the signal keeps crossing the limit in both directions.

Latch and acknowledge

An alarm latches until a human has seen it. The rule you do not break:

An alarm clears only when the condition is gone AND it has been acknowledged.

Condition

Acknowledged

Result

present

no

new alarm, flashing

present

yes

standing alarm, steady

gone

no

unacknowledged return, still displayed

gone

yes

cleared

The third row is the one that matters. If you clear the alarm the moment the value comes back, an event that happened at 3 a.m. is gone before the morning shift arrives.

First-out

When a pump trips, ten alarms arrive in one second and nine of them are consequences. First-out records which condition came first and locks that record until everything is clear. That is what tells you the cause instead of the symptoms.

Priority

ISA-18.2 wants priority assigned from consequence, not from how the programmer felt that day. Three or four levels is enough: critical, high, low, plus journal-only. A healthy distribution in practice is roughly 5% critical, 15% high, 80% low. If everything in your project is "high", your project has no priorities.

Too many alarms is a hazard

This is not a matter of taste. Major incidents, the 2005 Texas City refinery explosion among them, list alarm flood as a contributing factor. The ISA-18.2 targets per operator:

Rating

Alarms per hour

Acceptable

under 6

Maximum manageable

12

Beyond human capacity

over 60

Every alarm with no required action is noise that buries the one that matters. If an operator does not have to do anything, it is not an alarm, it is information. Put it in the event journal and take it off the alarm list.

One more practical point

Annunciate the lamp differently for the two states: flashing for unacknowledged, steady for acknowledged-but-standing. An operator reads that across a room, which is more than can be said for a list on a screen.

Try it in the lab

The lab runs in your browser: an ST editor, a virtual process that suits the lesson, the same program as a live ladder diagram, a watch table, and export to Siemens SCL.

What to try

  1. Run the program: the tank fills to 85% and drains to 60%.
  2. Two seconds above 80% the alarm latches and the lamp flashes. Press START (ACK): the lamp goes steady.
  3. Once the level falls below 75% the alarm clears, but only if it was acknowledged.
  4. Watch HiOn, HiLat and HiUnack in the watch table to see each stage.

Terms in this lesson

People find this lesson by searching

ISA 18.2 alarm managementalarm management plc programminghigh level alarm plc logicalarm deadband and on delayfirst out alarm logicalarm flood operatorlatch and acknowledge alarm plcalarm priority rationalization

Course outline

  1. 01What is Structured Text, and when to use it instead of ladder
  2. 02How a PLC runs your code: the scan cycle and the process image
  3. 03Program structure: POUs, PROGRAM, FUNCTION and FUNCTION_BLOCK
  4. 04Your first program: starting a pump with seal-in logic
  5. 05Data types: BOOL, INT, REAL, TIME and the rest
  6. 06Declaring variables: VAR, VAR_INPUT and RETAIN
  7. 07Literals and constants: 16#FF, 2#1010 and T#5s
  8. 08Type conversion and scaling a 4-20 mA signal
  9. 09Assignment and arithmetic in ST: := and operator precedence
  10. 10Boolean logic, comparisons and bit operations
  11. 11Standard functions: ABS, SQRT, MIN, MAX, LIMIT, SEL, MUX
  12. 12IF, ELSIF and ELSE: the rules and when to avoid them
  13. 13The CASE statement and your first state machine
  14. 14The FOR loop and the watchdog
  15. 15WHILE, REPEAT, EXIT, CONTINUE and RETURN
  16. 16Edge detection: R_TRIG, F_TRIG and the "it fired every scan" bug
  17. 17Timers: TON, TOF and TP
  18. 18Counters: CTU, CTD and CTUD
  19. 19SR and RS flip-flops: which one wins
  20. 20Writing your own function
  21. 21Writing a function block
  22. 22Arrays in Structured Text
  23. 23Structs and enumerations
  24. 24References and pointers
  25. 25The state machine pattern: a batch sequence that cannot get stuck
  26. 26Alarm management to ISA-18.2: delay, deadband, latch, acknowledge, first-out
  27. 27Analogue signal processing: counts to engineering units, NE43 and filtering
  28. 28Closed-loop control in ST: hysteresis first, then a practical PID
  29. 29Motors and valves in practice: permissives, feedback and travel time
  30. 30The same ST on every platform: SCL, Studio 5000, CODESYS, TwinCAT
  31. 31Testing and debugging ST: the watch table, forcing and simulation
  32. 32An ST style guide: naming, comments, constants and version control
  33. 33Final project: a complete tank station with a state machine and alarms
  34. 3420 interview questions on ST and PLC programming, with answers