Subcondition
Alarms have a condition which, when active, has to have one active subcondition. The active subcondition provides an indication of the state of the alarm (see Understand Alarm Conditions and Subconditions in the ClearSCADA Guide to Alarms).
Alarm conditions can have single or multiple subconditions, with each subcondition representing one of the alarm’s possible states. The alarm condition can only have one active subcondition at any time. For example, an advanced outstation has a condition called 'OutstationComms' which has four subconditions: 'Disconnected', 'Failed', 'AvailableMDRPFailed', and 'HealthyOtherFailed'. So when the outstation has an uncleared and/or an unacknowledged alarm and that alarm is due to the outstation failing, the 'OutstationComms' condition is active and the 'Failed' subcondition is active.
The Alarm.SelectedAlarms and Alarm.Alarms properties both return an alarm collection and each alarm in the collection has a Subcondition property. The Subcondition property represents the active subcondition of the selected alarm. You can access the Subcondition in your script.
Syntax |
Subcondition |
Description |
Returns a string that represents the name of the active subcondition for the alarm. |
Arguments |
None. |
Returns |
String. A string that contains the name of the alarm’s active subcondition. |
Example:
In this example, Alarm.Subcondition
is used to return the string that represents the active subcondition of the selected alarm. The string is displayed in a message box next to the text "Subcondition", and the source of the alarm, the time of the alarm, the severity description, the alarm item’s full name, and the name of the logged on user are also shown.
- Function ShowAlarmInfo( Alarm )
- MsgBox "One Alarm Selected", "Subcondition" & Alarm.Subcondition & ", "Severity" & Alarm.SeverityDesc & ", Time " & Alarm.Time & ", "Source" & Alarm.Source & ", logged on user name " & Alarm.Server.Username & ", Object name " & Alarm.Object.Fullname
- End Function