AlarmActive
- Last UpdatedApr 15, 2024
- 1 minute read
Determines if any alarms are active in the user's area. Call this function from the Page Strings database, to display an alarm message at a specified AN on a graphics page. You can specify the type of alarms, for example, active hardware alarms or disabled non-hardware alarms.
Syntax
INT AlarmActive(nType [, sClusterName])
nType:
The type of alarms to check:
Non-hardware alarms
0 - Active alarms
1 - Unacknowledged alarms, ON and OFF
2 - Highest priority unacknowledged alarm
3 - Disabled alarms
Hardware alarms
5 - Active alarms
6 - Unacknowledged alarms, ON and OFF
sClusterName:
The name of the cluster to check for active alarms. If this argument is blank or empty, the function will check the connected clusters.
Return Value
-
1 or 0 for Non-hardware alarms (modes 0, 1, and 3).
-
The priority of the highest priority unacknowledged alarm (mode 2).
-
The number of active alarms for Hardware alarms (modes 5 and 6).
Example
|
Strings |
|
|
AN |
9 |
|
Expression |
AlarmActive(5) |
|
True Text |
"Hardware Alarms Active" |
|
False Text |
"No Active Hardware Alarms" |
|
Comment |
Display the alarm status at AN 9 |