You are here: Core Reference > Coding > Scripting > SeverityDesc

SeverityDesc

The Alarm.SelectedAlarms and Alarm.Alarms properties both return an alarm collection. Each alarm in the collection has a SeverityDesc property that you can access in your Alarm Banner script. The SeverityDesc property returns the Severity of the alarm as a string (unlike the Severity property which returns the Severity as a number).

The string that is returned by the SeverityDesc property contains the name of the Severity range that corresponds to the value of the alarm’s source. For example, if the default severity ranges are in place and an analog point’s value rises to 800, an alarm is raised and the severity of that alarm is High (as 800 falls within the default range for the High severity). This means that the alarm’s SeverityDesc property will return 'High'.

Syntax

SeverityDesc

Description

Returns the severity of the alarm.

Arguments

None.

Returns

Severity {string}. The alarm’s severity is returned as a string.

Example:

In this example, Alarm.SeverityDesc is used to return the severity description of the selected alarm. The string is displayed in a message box next to the text "Severity", and the time of the alarm, the alarm item’s full name, and the name of the logged on user are also shown.

  • Function ShowAlarmInfo( Alarm )
    • MsgBox "One Alarm Selected", "Severity" & Alarm.SeverityDesc & ", Time " & Alarm.Time & ", logged on user name " & Alarm.Server.Username & ", Object name " & Alarm.Object.Fullname
  • End Function

ClearSCADA 2015 R2