AlarmClear
- Last UpdatedSep 09, 2025
- 2 minute read
Clears an acknowledged (and off) alarm from the active alarm list. You can clear the alarm where the cursor is positioned, one or more alarm lists on the active page, a whole category of alarms, or alarms of a particular priority.
If you set the [Alarm]AckHold parameter to 1, alarms that go off and have been acknowledged are not removed from the active list until this function is called.
Syntax
INT AlarmClear(Mode, Value [, ClusterName] )
Mode:
The type of clear:
0 - Clear a single alarm
• Set Value to 0 (zero) to clear the alarm where the cursor is positioned
• Set Value to the AN where the alarm is displayed.
1 - Clear a page of alarms. AN alarm page can contain more than one alarm list:
• Set Value to the AN where the alarm list is displayed.
• Set Value to 0 to clear the (displayed) alarm list (on the active page) where the cursor is positioned.
• Set Value to -1 to clear every (displayed) alarm list on the active page.
2 - Clear a category of alarms:
• Set Value to the alarm category (0 to 16375) of the alarms to clear. Please be aware that alarm category 0 indicates all categories; alarm category 255 indicates hardware alarms.
• Set Value to the group handle to clear a group of categories.
3 - Clear alarms of a specific priority.
Hardware alarms are not affected by priority.
• Set Value to the alarm priority (0-255) of the alarms to be cleared. Alarm priority 0 indicates all priorities.
• Set Value to the group handle to clear a group of alarms of different priorities.
Value:
Used to specify which alarms to clear.
ClusterName:
Used with Mode 2 or 3 to specify the name of the cluster in which the alarms being cleared reside. This argument is optional if the client is connected to only one cluster containing an Alarm Server or you are resolving the alarm server via the current cluster context.
This argument is not required where the mode is 2 and the value is 255 (hardware alarm category).
This argument is enclosed in quotation marks "".
Return Value
Alarm commands on single clusters will return either 0 if successful or an error code if unsuccessful.
Alarm commands across multiple clusters may also return a partial success result, whereby a command has been successful on 'at least' one cluster but unsuccessful on another cluster.
Related Functions
GrpOpen, AlarmClearRec, AlarmClearTag, AlarmAck, AlarmDisable, AlarmEnable
Example
|
System keyboard |
|
|
Key Sequence |
Clear |
|
Command |
AlarmClear(0, 0) |
|
Comment |
Clear the alarm where the cursor is positioned |
|
System keyboard |
|
|
Key Sequence |
ClearAll |
|
Command |
AlarmClear(1, -1) |
|
Comment |
Clear a page of alarms |
|
System keyboard |
|
|
Key Sequence |
AlarmClear ### Enter |
|
Command |
AlarmClear(2, Arg1, "clusterXYZ") |
|
Comment |
Clear alarms of a specified category in cluster XYZ |
|
System keyboard |
|
|
Key Sequence |
ClearPri ########### Enter |
|
Command |
AlarmClear(3,Arg1, "clusterXYZ") |
|
Comment |
Clear alarms of a specific priority in cluster XYZ |