IMD SolutionComputing LibraryShop main store

Comparison

PI event frames vs event pipes for a queryable alarm list

Edge computing and IIoT Published 7 min read By IMD Solution engineering team

Short answer

Generate alarms as AF event frames from analytics: an open frame is an active alarm and a closed frame a cleared one with start and end times, readable through AF SDK, PI OLEDB Enterprise, PI Web Services and PI JDBC Driver. Notifications, event pipes, OLEDB queries and OPC DA/HDA move values or messages but keep no queryable active state, so a restarted client at scale cannot rebuild its list.

On this page
  1. What the alarm client has to answer
  2. The five access paths compared
  3. Why notifications and event pipes cannot list what is active
  4. How event frames carry the alarm state
  5. Rebuilding the active list for 100,000 tags after a restart
  6. Building the event-frame alarm path
  7. Verifying an alarm end to end
  8. Questions asked

You want PI to run alarm management for up to 100,000 tags, compared against thresholds held in AF, and hand the result to an external alarm client. The answer: generate the alarms as AF event frames from AF analytics. An open frame is an active alarm; a closed frame is a cleared alarm carrying its start and end times; and the client reads frames through AF SDK, PI OLEDB Enterprise, PI Web Services or the PI JDBC Driver. The other four candidates on your shortlist, Notifications with a web service delivery channel, event pipes, OLEDB queries and OPC DA/HDA, all move data, but none stores an active or cleared state the client can query after a restart. Getting values out of PI is the easy half; a queryable alarm state decides the architecture.

What the alarm client has to answer #

A bespoke alarm list needs three things from PI: the alarms active right now, a start and end time for each, and a way to ask again at any moment. That last one is the test that decides the design. Restart the client, open the screen late, or lose the network for an hour; the list must still come back correct from the PI side.

Two failures look identical on the screen, an empty or stale list, but have different causes. An alarm that never appears is usually tag-side: the source is not updating or arrives with bad quality. An alarm that was delivered but cannot be listed after a restart is architecture-side: the state existed only as a one-shot message and nothing stored it.

A queryable alarm state also has to keep active separated from long cleared, the same discipline that explains why system.alarm.queryStatus returns months-old alarms on another platform.

The five access paths compared #

Path Where thresholds are evaluated Alarm state stored in PI? Fit for a 100,000-tag alarm list
Notifications with web service delivery channel In notification rules on AF and PI data No queryable store; the delivered message is the record Pushes events out; cannot answer which elements are active now
Event pipes (AF SDK) In your client code, against a threshold cache loaded from AF No Streams value changes well; you own the comparison, the cache and gap recovery
PI OLEDB or a linked SQL server In SQL you write No Pull model; repeated snapshot sweeps become polling load
OPC DA/HDA In the OPC client No; tag values only, no AF context Thresholds duplicated in the client and synced by hand
Event frames from AF analytics Server-side, PE expressions on AF attributes Yes, as frames with start and end times The alarm system of record, queryable through four interfaces

OPC DA/HDA deserves its honest due as a history transport; reading Proficy Historian OPC-HDA tags into Ignition is a normal, working pattern. But it carries tag values with no AF context, so every threshold would be copied into the client and kept in step by hand.

The SQL row has its own failure modes on the way in; why Citect alarm logging never reaches SQL Server walks through the classic ones. And even when the rows land, a log answers nothing about which alarms are active now.

Why notifications and event pipes cannot list what is active #

A notification fires and delivers. The web service endpoint receives the message, and that message is the record: delivery creates no object you can query for the current active set, and notification events are not exposed through PI OLEDB Enterprise. A client that restarts, or a screen that opens late, has no PI-side list to read, and rebuilding state from received messages fails exactly when the receiver was down. Storing the active and cleared status of elements in event frames from Notifications was under evaluation and not confirmed on the product roadmap; design as if it will not arrive.

An event pipe is the opposite trade. The AFDataPipe.Subscribe method registers an IObserver for AFDataPipeEvent, and value changes stream to your code efficiently. But the pipe carries values, not verdicts: the comparison against thresholds, the threshold cache, and recovery after a disconnect all live in your client. Changes during a gap are never delivered, so alarms that started or cleared while you were disconnected are missed unless you backfill them yourself.

How event frames carry the alarm state #

AF analytics evaluate PE expressions against AF attributes, server-side. When the start trigger is true, the analysis opens an event frame and records the start time; that is the active alarm. When the end condition fires, the frame closes and records the end time; that is the cleared alarm, with its duration for free. The thresholds are AF attributes, so each limit lives in one place, referenced by the expression and never copied into client code.

The client then reads events instead of tag streams: query the open frames on the alarm template at startup, then search for new and closed frames, over whichever of the four supported interfaces fits the client's stack. Evaluation load stays on the server, and the client touches only the events.

Rebuilding the active list for 100,000 tags after a restart #

Inputs #

  • Tags under alarm rules: up to 100,000, your stated ceiling.
  • Alarm rule: one threshold per tag, held as an AF attribute on the element template.
  • Frame behavior: one open frame per alarming tag while its condition holds.
  • Worst case: every tag in alarm at the instant the client restarts.

Rule #

An open event frame is an active alarm, so one search for open frames on the alarm template returns the entire active list. A comparison design, pipes or OPC, must rebuild the same list from raw values and its own threshold cache.

Arithmetic #

  • Worst-case open frames: 100,000 tags x 1 frame per tag = 100,000 frames.
  • Event-frame client at startup: 1 query, returning up to 100,000 rows.
  • Comparison client at startup: 100,000 current values read + 100,000 thresholds loaded + 100,000 comparisons run = 300,000 client-side operations before the first list renders.

Result #

The same worst-case list costs one stored query on the event-frame design. The comparison design spends 300,000 operations and still carries a blind window: anything that started and cleared while the client was down was stored nowhere.

Decision #

Any alarm list that must be correct after a restart is built on event frames, and a 100,000-tag alarm list must be. The dividing line is the restart: a client that never goes down and only streams values can live on pipes; the moment the list has to be rebuilt on demand, event frames are the only one of the five paths that can answer.

Building the event-frame alarm path #

  1. Confirm the installed PI System release includes AF Asset Based Analytics; read the release notes of the installed version rather than assuming.
  2. Model each alarmed asset as an AF element from a template: the process value attribute bound to its PI Point, the threshold attributes as static values or table lookups.
  3. Create an event frame template for the alarm, then define the analysis on the element template with start and end triggers written as PE expressions on those attributes.
  4. Roll out by template, so the whole tag count is covered by a handful of analyses instead of hand-built rules.
  5. Build the external client to query open frames at startup and then search for new and closed frames.
  6. If the external system needs a push, attach a notification with the web service delivery channel to the alarm condition, delivery only and never the record.

Verifying an alarm end to end #

Separate the tag from the binding before blaming the analytics:

  • Tag: the snapshot shows a current timestamp and good quality.
  • Binding: the AF attribute resolves to that tag and returns the same value, with no configuration error.
  • Threshold: the attribute holds the configured limit.
  • Frame: a search on the template shows the frame open, with a start time at the crossing.
  • Client: the open frame appears in the alarm list and moves to cleared when the frame closes.

Then force a test value across the threshold on one element and back, and watch both transitions, open and close, arrive in the external list. And keep the division honest: this list is for overview and sequence of events, while trips and interlocks stay in the safety PLC where they belong.

Questions asked

Can Notifications still deliver the alarms?

Yes, as a delivery layer only. Attach a notification with the web service delivery channel to the alarm condition so the external system gets a push, while the event frames remain the record of active and cleared state. A missed message then costs one delivery, not the integrity of the alarm list.

What happens to the times when two event frames are merged?

The merged frame takes its start time from the first event and its end time from the second, so one row can span both occurrences. If the alarm list shows one entry per frame, plan the merge behavior before an operator sees a duration that quietly covers two separate trips.

Which OLEDB provider actually lists event frames?

PI OLEDB Enterprise, the provider that exposes the AF database, is the one that returns event frames. The provider that serves the PI Data Archive returns tag data only. Check which provider the client's connection names before blaming the analytics for an empty result.

How do I confirm my release includes AF analytics?

AF Asset Based Analytics was originally targeted for release in the first half of 2014. Read the release notes of the installed PI System version rather than assuming the feature is present, and confirm event frame support in whichever retrieval interface the client uses.

What if a trigger references an attribute that does not resolve to a PI Point?

The PE expression cannot evaluate, no event frame opens, and the alarm never appears on any client. From the operator's chair that looks identical to a dead tag, so check the attribute binding to the PI Point before touching the client or the analytics.

Keep reading

  • Explainer

    Why PI Server cannot receive Historian alarms and events

    The PI Data Archive holds timestamped values per tag, so the Historian publisher disables alarms and events for a PI Server destination; no controller or tag change enables it. Keep time-series replication on the native path and carry alarm occurrences through a PI interface or a checkpointed extraction.

    Edge computing and IIoT

  • Selection guide

    Choosing a PI System to Oracle integration route with validation

    With read-only PI access and cleansing owned by the receiving side, pull AF assets and status with the PI OLEDB Enterprise Provider through SSIS into a staging SQL Server, qualify transitions there — reject momentary interruptions and anything older than 2 hours — then write Oracle. Event Frames and the RDBMS interface need PI-side configuration or tag-based mapping that loses AF context.

    Edge computing and IIoT

  • Troubleshooting

    Why PI AF SDK writes stall after a PI Server reboot

    After a PI Server restart, AF SDK writes can return no errors while nothing lands in the archive, because PiServer.ConnectionInfo.IsConnected keeps reporting the old connection state and snapshot errors go unchecked. Gate recovery on operation-level errors instead, and preconfigure PI Buffer Subsystem so BufferIfPossible actually queues events through the outage window.

    Edge computing and IIoT

Suspended and locked on a redundant Process Historian pair