Skip to content
Tutorials Center
My learning

Topics

Lesson 25 of 37 ยท HMI and SCADA

Alarms, Trends and Data Logging in Automation

Learn alarm design for PLC and SCADA systems: limits, deadband, on-delay, acknowledgement, priorities, trends and logging, with runnable C models of an alarm state machine.

When something goes wrong in a plant, the first thing the operator needs is to be told, clearly and early, without being buried in noise. Afterwards, engineers want to know exactly what happened, which means recorded history. Alarms and trends serve these two needs. Doing them well is a craft: too few alarms and problems go unnoticed, too many and operators stop reading them (this is called alarm flooding).

PLC and SCADA software are not available here. The ideas are shown with read-only snippets and with C stand-ins that model the alarm logic.

What is an alarm?

An alarm is a notification that a condition needs a human response. That definition matters. A message that needs no action is an event or a status, not an alarm. Guidelines such as ISA-18.2 and EEMUA 191 say every alarm should be:

  • Relevant: it matters to the operator.
  • Unique: no duplicates of the same problem.
  • Timely: early enough to react.
  • Prioritized: critical alarms stand out.
  • Understandable: the text says what is wrong and what to do.
  • Diagnostic: it helps find the cause.
  • Advisory: it guides, not just announces.
  • Focused: it draws attention to the important.

Analog alarm limits

For an analog value such as tank level, you define limits: LL (low-low), L (low), H (high), HH (high-high). The ordinary alarms H and L warn early; HH and LL are severe and may also trigger an automatic trip. Each limit is a threshold, and a naive comparison causes chatter: when the value hovers around the limit, the alarm flickers on and off.

Two cures:

  • Deadband (hysteresis). The alarm sets at 80 but clears only below 78.
  • On-delay. The condition must hold for a number of seconds (a TON timer) before the alarm is raised.
C C stand-in: a high alarm with deadband and delay

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with scanf or fgets), it gets the next line from this box.

Notice how the brief excursion at t=2 does not raise the alarm (the delay was not met), and how the alarm stays active at 79.5 and 78.5 until the value drops below 78.

The alarm life cycle

Industrial alarms are more than a lamp. Each one moves through states:

stateDiagram-v2
    [*] --> Normal
    Normal --> ActiveUnack: condition true
    ActiveUnack --> ActiveAck: operator acknowledges
    ActiveUnack --> ClearedUnack: condition clears
    ActiveAck --> Normal: condition clears
    ClearedUnack --> Normal: operator acknowledges

Active and unacknowledged alarms demand attention. Acknowledging says "I have seen it", not "it is fixed".

Typical HMI behavior: an unacknowledged alarm flashes and sounds a horn; acknowledging stops the flash; when the condition clears, the alarm leaves the list (or waits for acknowledgement if it cleared before anyone saw it).

C C stand-in: alarm acknowledge state machine

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with scanf or fgets), it gets the next line from this box.

Priorities and flood control

Assign each alarm a priority (for example critical, high, low) based on consequence and response time. Then control volume:

  • Rationalize. Review every alarm: purpose, expected response, limits. Remove those with no action.
  • Shelve nuisance alarms temporarily, with a reason and an expiry.
  • Suppress by state: alarms for a pump should be disabled when the pump is intentionally stopped, otherwise stopping it produces a "low flow" alarm.
  • Group related alarms so one root cause does not generate fifty messages.
  • Measure. Common targets are fewer than about ten alarms per operator per hour in steady state, and no sustained floods.

A trend is a graph of values over time. Real-time trends show the last minutes, while historical trends read from the historian. Trends answer questions alarms cannot: "was the pressure creeping up all day?" Add alarm limit lines and setpoint overlays so values read in context.

Data logging

Logging means storing values. Decisions to make:

  • What: key process values, alarms, operator actions, batch data.
  • When: every fixed interval (cyclic), on change by a deadband, or on an event.
  • Where: a SCADA historian, a database, or files on the PLC's memory card.
  • How long: regulations (food, pharma) may demand years, so plan storage and archiving.
  • Timestamp source: stamp at the PLC, not only at the server, so network delay does not distort the time.

A logger that stores only meaningful changes is a small C program: keep the last stored value and record a new sample when the change exceeds the deadband or a maximum time passes.

C C stand-in: change-based logger with a heartbeat sample

Press Run (or Ctrl + Enter) to see the result here.

Program input ยท what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with scanf or fgets), it gets the next line from this box.

The regular "timed" samples show an operator that the logger is alive even when the process is steady.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is the purpose of a deadband on an alarm?

    With a deadband the alarm sets at the limit but clears only after the value drops well below it.
  2. 2. What does acknowledging an alarm mean?

    Acknowledgement records that someone saw the alarm. The condition may still be active.
  3. 3. Which alarm is better practice?

    Alarms should need a human response. Status messages without action are events, not alarms.
  4. 4. Why timestamp data at the PLC and not only at the server?

    A PLC timestamp marks when the event happened, not when the server happened to receive it.

Summary

  • An alarm is a condition that needs a human response; keep them relevant, prioritized and few.
  • Use limits (LL, L, H, HH) with a deadband and on-delay to avoid chatter.
  • Alarms move through states; acknowledge means seen, not solved.
  • Trends show how values evolve; logging needs decisions about what, when, where, how long and timestamps.
  • The C programs are stand-ins that model alarm and logging logic.

Next: Fieldbus and Industrial Networks Overview