EventConditionCount

This method is invoked when certain events occur. It counts state changes.
Application example
The example shows how to summarize the number of alarms, overrides, and critical states of the Evt instance.
// Illustrate how to determine (cumulative) event information of a view instance.
VAR
bUpdate : BOOL;
{region 'Settings'}
iSource : I_BA_View := MAIN.Evt; // Instance to be queried for informations (This can be any view).
{endregion}
{region 'Result'}
nAlarms : UINT; // Count of active alarms.
nOverridden : UINT; // Count of overridden objects.
nCritical : UINT; // Count of objects in "Critical" priority.
{endregion}
END_VAR
// Count of active alarms.
nAlarms := iSource.EventConditionCount(E_BA_EventCondition.eTypeAlarm);
// Count of overridden.
nOverridden := iSource.EventConditionCount(E_BA_EventCondition.eFlagOverridden);
// Count of objects in "Critical" priority.
nCritical := iSource.EventConditionCount(E_BA_EventCondition.ePrioCritical);Syntax
VAR_INPUT
eCondition : E_BA_EventCondition;
END_VAR
Inputs
Name | Type | Description |
|---|---|---|
eCondition | E_BA_EventCondition | State of an event. |
Return value
Name | Type | Description |
|---|---|---|
EventConditionCount | UINT | This shows how many times an event has changed state. |