TopAlarmState function
- Arguments
- 1–2, Optional arguments are indicated by a ? following the
argument name.
Argument Description DisplayNameA literal or graphics expression that resolves to the name of a display. ChildDisplays?A literal or graphics expression whose value is interpreted as true or false. When evaluated to: True, the return count includes active or unacknowledged alarms for the specified display, as well as from all direct and indirect child displays of the specified display in the display set.
False, the return count includes active or unacknowledged alarms in only modules, nodes, and devices whose primary control display is the specified display.
If this argument is omitted or undefined, the assumed value is false.
- Return values (number)
-
- The top alarm state, according to the most important to see by alarm banner sorting rules, of all active or unacknowledged alarms satisfying the argument criteria.
- 0, if no active or unacknowledged alarms present match the argument criteria.
- 1, if the top alarm is Active/Acknowledged.
- 2, if the top alarm is Inactive/Unacknowledged.
- 3, if the top alarm is Active/Unacknowledged.
- 0 with a bad data quality status, if
DisplayNamecannot be resolved.
- Syntax
DARU.TopAlarmState(DisplayName, ChildDisplays)- Examples
-
Example Result DARU.TopAlarmState(DL.DN("Reactor1"))Shows the top alarm state of all active or unacknowledged alarms associated with the Reactor1 display. DARU.TopAlarmState(Gem.DisplayName, true) >=2Shows the top alarm state of all active or unacknowledged alarms with minimum priority of 2 and that are associated with the ??? display and its child displays. Note:It is recommended that you use the DL.DN() function for enabling display rename tracking when theDisplayNameargument is a literal string.