Internal events

OPC Events and external events, as described in External events, provide means to store events collected from any third-party system that supports the OPC A&E server interface. Contrary to this, internal events are events that are generated based on numerical data collected to RTDB. Event generation is controlled by creating event triggers ("EventTrigger" Vtrin class). The following sections give detailed information on how to use and understand available events, as well as how to create new event triggers to spawn new internal events.

Event triggers are configured for database variables. The system uses event triggers to generate events with different severities (critical alarms, warnings, notices, and non-alarms) when the conditions that have been specified for the triggers are fulfilled. Typical triggers for analog variables are high limits and low limits. Typical triggers for binary variables are state changes.

For example, a high limit trigger would let the system generate an event of a certain severity when the value of the variable exceeds the high limit. Another event might be configured to be generated when the value returns below the high limit.

The following figure illustrates the logical relationships between related classes.

Event triggers are created using the "Event Configuration" list available from Vtrin in Maintenance\System\Events and Alarms. The "Event Configuration" list is a master-detail list where variables, which have event triggers associated, are presented in the upper part. The event trigger associated with a particular variable is shown in the lower part when the variable is selected in the upper part. After installation, there are no event triggers available, and the display is empty.

For example, a row could define that a warning event is triggered when the value of the variable specified on the row becomes higher than the limit specified on the row.

To be able to configure events, write access is needed to the database.

The easiest way to create event triggers is by using Vtrin. The "Event Configuration" list is found from the main tree in Maintenance\System\Events and Alarms. In the following example, a new variable, "EventTriggerTestVariable" is created. It is used to generate events whenever the current value of the variable becomes greater than 10.

  1. A new variable is created from the upper part of the "Event Configuration" display. If a variable is created from this display, the value of the "Events" property is automatically set to "true". If an existing variable is used, this should be set to true manually (this has to be done from the list view or from the generic properties, as the property is not available in the custom variable dialog).
  2. A new event trigger is created from the lower panel (from "Edit mode", click the "New" button). The property "InUse" should be set to "true". The limiting trigger value 10 is configured to the property "Limit" (by default, the "TriggerType" is already "High limit"). Finally, the value of the "Log" property is set to "true". This enables logging into the "Alarm log". In case the value of the "Log" property would be "false", the warning would only be visible from the variable instance's blinking current value with an appropriate warning icon. Changes are committed using the "Commit" button, and after that returning from "Edit mode" to "Normal mode" (Revert).
  3. Testing the configuration can be done by double-clicking the variable and feeding a value bigger than 10 for the current value.

The following figure illustrates the situation after the three steps above are executed.

Event engineering properties

Property

Type

Description

Variable

uint32

Reference to the variable instance where the event trigger is applied.

Description

string[64]

Description of the variable where the event trigger is applied.

InUse

bool

True if the trigger will be evaluated, false if not.

Trigger

uint32

Read the next chapter for more detailed value descriptions.

Limit

object

Defines the limit that causes the state transition in event triggering. The type is derived from the variable instance"s type, and can be either 64bit integer or double.

Period

double

Time period in seconds, if the event or limit value represents some time-dependent value.

Area

uint64

Defines which alarm area the event trigger belongs to. The numeric value should not exceed 65535 because the value in AlarmLog is only 16 bits. If the setting is zero, the ProcessArea from the alarming Variable or Equipment property is used instead. (Version info: before 5.1/2017-04-25, the setting was ignored and worked as it was given as zero).

DeadBand

object (float/int)

After some state change has been triggered, the return back to normal state happens once the limit has been exceeded with the specified dead band (absolute deadband used).

External

uint32

External event observation identification. If EventEngineering.External is greater than 0, the event observation, or limit handling, for the event is performed by the source of the value (e.g. an external data acquisition system). The event identification is provided in the latest value attribute CLEX (=EventEngineering.External), if the event is triggered (limit violated) and it has higher priority than the other external events.

Reference

uint32

In addition to using a static limit, there is the possibility to use another variable's value as a dynamic limit. "Reference" is set to contain a reference to the variable that contains the current value to be used as the dynamic limit.

TriggerMethod

uint32

In case the "Trigger" is 13 ("Event trigger method"), the "TriggerMethod" defines the method that is used to evaluate the trigger condition. If the method returns true, the event state is valid.

SuppressionMethod

Alarm suppression method. If the conditions for the event are fulfilled, but the method execution specified by EventEngineering.SuppressionM returns a nonzero value, the specified alarm (EventEngineering.Priority) is suppressed. An indication for the suppressed alarm is set (CSAS). The event observation is continued. The special suppression method is AlarmSuppressed (11), which means that the alarm is suppressed without executing any other method.

ActionMethod

Action method to be executed when entering the event state. If EventEngineering.ActionMethod is zero, no method is executed. EventEngineering.ActionM is a user-written method.

ReturnMethod

Action method to be executed when leaving the event state. If ReturnMethod is zero, no method is executed. ReturnMethod is a user-written method.

Diary

bool

If true, event is stored into diary log if available.

Log

bool

If true, event is stored into alarm log.

OpcEvent

bool

If true, event is stored into Opc Event log. (From Version: 5.3/2022-12)

DiaryReturn

bool

If true, event from returning back to normal state is stored into diary log.

LogReturn

bool

If true, event from returning back to normal state is stored into alarm log.

OpcEventReturn

bool

If true, event from returning back to normal state is stored into Opc Event log. (From Version: 5.3/2022-12)

SetQuality (Set Validity)

uint2

Status that the system sets for the variable when the triggering condition becomes true ("No change", "Set questionable", "Set bad").

Evaluation

uint8

If the variable has several event triggers, the "Evaluation" defines the priority that the triggers are evaluated by.

Priority

uint8

Alarm priority used when condition is triggered.

ReturnPriority

uint8

Alarm priority used when returning back to normal state.

Modified

DateTime

Row modification time shows the last time when the event trigger instance has been modified.

Speak

bool

If a sound-support package has been installed, the events generated are spoken.

EvaluateAlways

bool

The system checks this trigger always even if an earlier trigger is active, so that multiple triggers can be active for the same variable. Notice that when multiple alarms are active, the "Alarm Priority" information of the current value only describes the priority of the first active alarm in the evaluation order. The other active alarms can be found from the ActiveAlarm class (ActiveAlarms database table), from entries where the "IsActive" property is true (version info: 5.3_25.06)

EvaluateAlsoForInvalid

bool

Evaluate this trigger also if the current value was invalid. Without this, most triggers evaluate only for valid current values. (version info: 5.3_25.06)

EvaluationConditionVariable

uint32

If non-null, the value of this variable must be in the set of Condition Flags of property EvaluationConditionValue to enable evaluation of this trigger. This property together with the EvaluationConditionValue property can be used to implement "Plant Mode" specific triggers.

The plant modes are integer values between 0 and 9. (Values up to 30 can be used but only the first 10 has been declared in UIStrings as Flags to be used in EvaluationConfitionValue).

For example, if the EvaluationConditionValue is 48, it means that this trigger is evaluated if the plant mode is currently 4 or 5 (i.e. 2^4 + 2^5 = 16 + 32 = 48).
The user interface presents the EvaluationConditionValue as a "flags" style enumeration, so that the user does not need to perform the above calculations, but can just define the settings as "M4 | M5" (I.e. for plant mode 4 and 5).

Notice that in many cases a site has only one plant mode variable, but the configuration supports multiple of them because the setting is trigger definition specific. (version info: 5.3_25.06)

EvaluationConditionValue

int32

Set of Condition flags. Multiple settings can be entered separated with pipe character (|). See description of "EvaluationConditionVariable". (version info: 5.3_25.06)

Trigger property in detail

The following table contains descriptions for the allowed values of the trigger property.

ValueDescription
0. High limitTriggers when the value of the associated variable exceeds the value in the "Limit" property.
1. Low limitTriggers when the value of the associated variable goes below the value in the "Limit" property.
2. Change speed limitThe maximum change per time period (the time period defined in "Period"), and the limit value is "Reference" or "Limit". Valid only for double type variables.
3. Difference limitThe maximum difference to the reference variable ("Reference"). Valid only for double type variables.
4. Total matchTo detect binary value states. Triggers when all bits match. Valid only for int64 and binary type variables.
5. Any bit match (bitwise AND not zero)To detect binary value states. Triggers when any bit matches. Valid only for int64 and binary type variables.
6. Oscillation surveillanceIf the value of the binary point changes more than once within the specified time period ("Period"), the event is generated. Valid only for int64 and binary type variables.
7. In-transit state surveillanceIf the state change of a two or four signals digital input value has taken more than the specified time period ("Period"), the event is generated. Valid only for binary type variables.
8. Binary indicated limit violationIndicated by a separate binary variable specified in the "Reference" property. When the binary goes to 1, the event is triggered. "Reference" defines the limit indicator binary for the analog variable, and the corresponding analog variable for the binary indicator.
9. Expiration surveillanceIf the time since the last update (CLT) of the variable is longer than defined in the period ("Period"), an event is generated.
10. Disabled processing surveillanceIf the current value processing of the variable is disabled (EGE=false), an event is generated.
11. Bad measurement group surveillanceIf the latest value has "bad measurement group" status (CLSBG), an event is generated.
12. Bad value surveillanceIf the status of the latest value is "bad" (CLSB), an event is generated.
13. Trigger condition methodUser-written trigger method ("TriggerMethod") is used as a trigger condition. Note: the actual implementation is not documented yet in detail.
14. Pulse input power surveillanceTime derivation aggregate is decreased, if a new pulse value has not been produced in the time interval defined in "Period".
15. Reset reference variableSet the value of the "Reference" variable to zero, when the state changes to binary value on (1). This trigger is only valid for binary variables. The event does not stay valid and it does not cause the event actions, event logging, or alarm priority changes.

Equipment model event triggers

It is possible to trigger events when a specific property on an equipment instance changes. This is done using the EventTriggerEquipmentProperty class.

1662

A conceptual model that shows how event triggers are related to the equipment model.

There are three ways of how property events can be set to trigger:

  1. When the property of a specific instance changes
  2. When the property of any instance of a specific equipment type changes
  3. When the property of any instance of a specific equipment type under a hierarchy subtree changes

From a configuration perspective, 1. and 2. are just special cases of 3. In 1., the subtree contains just the one instance and in 2., the subtree equals the whole hierarchy.