Overview of OPC Alarms and Events (OPC A&E)

Additional OPC A&E resources

Visit our OPC A&E Resources page

Exele OPC A&E Software

Try our free OPC Test Tool


TopView: Alarm Management, Alarm Notification, and Remote Monitoring



Overview of OPC A&E

OPC A&E is a standard that allows alarm and event generators to report the details of their events to clients. An OPC A&E client (TopView Events) can subscribe to the events without knowledge of the specifics of the underlying alarm generator.

Each OPC A&E event contains details such as:

Example OPC A&E Servers include:

See www.opcfoundation.org for more information on OPC A&E.

OPC A&E Overview and Terminology

To receive OPC A&E events, a client must create a subscription with the OPC A&E Server. Each subscription defines details of the desired events (subscription filter) and settings that define the some details of event delivery.

Each OPC A&E event contains basic information such as what happened (high level alarm) and when (at 10am this morning) as well as additional details such as the type of event (rate-of-change alarm), where it happened (processing area 9) and who generated the event (tank 94). Each OPC A&E Server vendor can use these fields to provide meaningful event information to clients.

Sample Facility – Bakery

To help explain OPC A&E we will use the following sample facility:

A Bakery facility has 2 buildings, BUILD1 and BUILD2. Each Building contains 2 mixers and 1 oven.

The mixers have alarms for low/high mixing speed (rpm < low limit OR rpm > high limit).

The ovens have alarms for low/high temperature (temperature < low limit OR temperature > high limit) and rate-of-change alarms (temperature change more than 1 degree up OR down within a specified period of time)

Event Type and Category

OPC A&E defines 3 event types: Simple, Tracking, and Condition. Alarms fall under the Condition event type. Each event type can contain categories of alarms.

If the event type is Condition, each category can define a list of possible conditions

Bakery Example

Event Area and Source

Bakery example 

The Areas are our buildings, and the Sources are the mixers and ovens

Event Severity

Each OPC A&E event contains a severity value from 1-1000

Bakery Example

Browsing the OPC A&E Server

The OPC A&E Specification provides a mechanism for a client to query the OPC A&E Server for some supported field values.

If implemented by the Server, a client can query the following information

The ability to query this information can assist with the definition of a subscription filter. See Filter for more information on the subscription filter.

OPC A&E Event Fields

The OPC A&E standard defines the available event fields. Some fields are available for all event types while other fields are specific to one event type. The vendor can also supply a set of vendor attributes to provide information beyond the standard list of event fields.

When describing the event fields, we may use example information from our Sample Facility – Bakery.

Note: The following list of OPC A&E event fields does not include a few fields used internally by OPC A&E clients.



Categories are groupings of events supported by an OPC A&E Server. Each category contains a name (string) and an ID (integer).

All 3 event types support categories but each category can include events of only one type.

Each source may generate events for multiple event categories. Category names must be unique within the OPC A&E Server.

Bakery: Level (low/high) and Rate-of-change are categories


An area is a grouping of equipment. The available areas are defined by the OPC A&E Server.

Bakery: BUILD1 and BUILD2 are our Areas.


A reference to the object that generated the event. A source could be a process tag, a device, or a subsystem. Available sources are defined in the OPC A&E Server.

Bakery: MIX1A, MIX1B, OVEN1, MIX2A, MIX2B, and OVEN2 are our Sources


The urgency of the event. This maybe a value in the range of 1 – 1000. Low severities are meant for informational alarms, and high severities indicate critical issues.

Bakery: defines event severity levels of 500, 800, and 950

Event time

The time that the event occurred.


Message text that describes the event.

Active time (event type = condition)

Time that the condition became active (for single-state conditions), or the time of the transition into the current sub-condition (for multi-state conditions).

Condition name (event type = condition)

A condition is a named state. An alarm is a special case of a condition, one which is deemed to be abnormal and requiring special attention.

Bakery: HI, LO, ROC UP, and ROC DOWN are conditions.

Subcondition name (event type = condition)

Conditions maybe single state, or multi-state. A multi-state condition is one whose state encompasses multiple “ranges” or sub-states which are of interest. For example, a “Level Alarm” condition may have multiple sub-states including HI and HIHI. Each sub-state is represented by a Subcondition. Subconditions must be mutually exclusive.

If a condition is single state, it has one subcondition whose value is equal to the condition.

Bakery: HI, LO, ROC UP, and ROC DOWN are conditions. We did not define subconditions therefore the event condition and subcondition will contain the same value.

Quality (event type = condition)

Indicates the quality of the underlying data items upon which this condition is based. The three basic quality values are Good, Bad, and Uncertain.

As an example, a “HI” condition event may be generated by a measurement value with an uncertain quality. The event quality would also be uncertain.

Changed (event type = condition)

Indicates which properties of the condition have changed to have caused the OPC A&E Server to send the event.

The changed properties can include:

New State (event type = condition)

Indicates the event properties of the condition which are currently set.

The new state can include:

Note: New state does not indicate that an item has changed. It indicates that the item is currently set.

As an example, a condition/alarm may occur and then later be acknowledged while the alarm is still active. Two events arrive: one for the alarm active and one for the acknowledge. In both events the New State value of Active is set because the alarm is active. In the second event the New State value of Acknowledged is also set.

See Detecting alarm/condition active for information on detecting new alarm events.

Acknowledge required (event type = condition)

An indicator as to whether or not an acknowledgement is required.

OPC A&E Subscriptions

An OPC A&E client can configure one or more subscriptions. Each subscription defines:

An OPC A&E client does not ask for new events from the subscription. An OPC A&E subscription creates callbacks to the client – as new events occur the client’s method for processing is called with the new events (the “callback”).

The subscription properties allow the client to control some details of event delivery. A few of these settings are requests that can be overridden by the OPC A&E Server.


Indicates if the subscription should receive events or not

Buffer time

The minimum time between sending of events to the client

Maximum size

The maximum number of events that will be sent to the client in one callback

Keep-alive time

Requests the OPC A&E Server to send heartbeat events if no real events have been sent. This allows a client to know that the subscription is healthy even if real events are not occurring.


The subscription can specify a filter based on five event field values.

* It may be possible to query the OPC A&E Server for a list of categories, conditions, areas, and sources. See Browsing the OPC A&E Server.

If multiple fields are specified in the filter they are logically AND’d together.
Example: filter “EventType=Condition”, “Area=BUILD1” includes events with event type = Condition AND area = BUILD1

If the same field is specified multiple times in the filter they are logically OR’d together.
Example filter “Area=BUILD1”, “Area=BUILD2” includes events with event type = BUILD1 or BUILD2.

Filter Mask

Area and Source subscription filters can include a mask to allow a range of values. The mask can include wildcard characters (*, ?, …) to match multiple values. See Filter Masks for more information on mask syntax and rules.

Detecting alarm/condition active

Once a subscription and subscription filter have been configured, an OPC A&E client can start receiving events. After specifying a subscription filter that only returns alarm/condition events, events may arrive due to:

In OPC A&E clients such as TopView, the user may only be interested in events where a condition becomes active (change into alarm from inactive state) or a subcondition has changed (e.g. alarm remains active and subcondition changes from HI to HIHI).

TopView for OPCA&E allows the user to perform addition filtering of incoming events based on all relevant fields of an OPC A&E event. This additional filter, configured as part of the Events Tag filter, allows the user to detect alarm/condition events.

The following configuration of the Events Tag filter should detect alarm/condition events.
* You should view the events of your OPC A&E subscription to verify the States and Changed fields of the desired events.

Filter Masks

Filter masks are supported in the TopView Events Tag filter and the OPC A&E subscription filter. Both filters follow the same filter syntax and rules.

Characters in mask string:

A group of one or more characters (charlist) enclosed in brackets ([ ]) can be used to match any single character and can include almost any character code, including digits.

Note: To match the special characters left bracket ([), question mark (?), number sign (#), and asterisk (*), enclose them in brackets. The right bracket (]) can’t be used within a group to match itself, but it can be used outside a group as an individual character.

By using a hyphen (-) to separate the upper and lower bounds of the range, charlist can specify a range of characters. For example, [A-Z] results in a match if the corresponding character position in string contains any uppercase letters in the range A-Z. Multiple ranges are included within the brackets without delimiters.

Other important rules for pattern matching include the following: