GetContainerNumActive

(Alarm Manager module)

Description: Returns the number of active alarms within a hierarchy of tags.
Returns: Numeric
Usage: Script or steady state.
Function Groups: Alarm Manager
Related to: Accumulate | GetContainerNumUnacked
Format: GetContainerNumUnacked(ContainerObj);
Parameters:  
ContainerObj
Required. The container tag to query.
Comments: In earlier versions of VTScada, if you had written a custom tag with a built-in alarm, you had to ensure that it contributed its active alarms to the count maintained by a hierarchical accumulator module. This is no longer true.

Example:

  TotalNumActive  = \AlarmManager\GetContainerNumActive(MyTagObject);

Where, "MyTagObject" represents the container tag object.

Example 2:

Given a Context-derived tag at the top level of the tag hierarchy named "Station 1", suppose that you want an expression in a calculation tag that will return the total number of active alarms in that context. The expression would be:

  \AlarmManager\GetContainerNumActive([<Station 1>]\Root)