Severity
The Alarm.SelectedAlarms and Alarm.Alarms properties both return an alarm collection. Each alarm in an alarm collection has a Severity property which is a number that represents the significance of the alarm. The number that is returned by the Severity property corresponds to the Severity level of the alarm. The default severity range is:
- Critical severity = 1000
- High severity = 667-999
- Medium severity = 334-666
- Low severity = 1-333
- No severity = 0
However, the severity range can be customized on your system by using the Server Configuration Tool (see Alarm and Event Severities in the ClearSCADA Guide to Server Administration). So you need to know what severity range is in place before you create an Alarm Banner script that uses the Severity property.
Accessing an alarm’s Severity property in your Alarm Banner script can be useful as it allows you to code different outcomes depending on the significance of the alarm.
Syntax |
Severity |
Description |
Returns the number for the alarm’s severity. |
Arguments |
None. |
Returns |
Severity {integer}. The alarm severity is returned as a number. |
Example:
In this example, the Severity property of an alarm is used to determine whether the Source of the alarm is added to a combo box on a Form. It sets the script to only add the sources of High and Critical alarms to the combo box (assuming the default severity range is in place).
- For Each objAlarm In AlarmBanner.SelectedAlarms
- If objAlarm.Object.CheckAccess("ALM")
- And objAlarm.Severity > 666 Then
- frmDrop.Add objAlarm.Source
- AddToArray sPointNames,
- objAlarm.Source
- End If