GetAlarmStatus

(Alarm Manager module)

Description: Returns a reference to an alarm's status structure, providing access to the alarm's current state without having to make function calls.
Returns: Structure (see comments)
Usage: Script Only.
Function Groups: Alarm
Related to: IsActive |IsDisabled | IsShelved |IsUnacked
Format: \AlarmManager\GetAlarmStatus(AlarmName)
Parameters:  
AlarmName
Required text.

Unique name for the alarm. Typically the unique ID, which can be obtained using GetAlarmName.
If there are multiple built-in alarms in a tag, the convention is to concatenate the UniqueID with a separator and a unique integer or string per alarm. For example, Concat(Root\UniqueID, \AlarmSeparatorString, 0).

Comments:

Use this when writing code that will monitor the status of an alarm. It is typically used in a tag's refresh module after calling Commission.

In older versions of VTScada, function calls were used for the same task. For the sake of backward-compatibility, those functions will continue to work, but should not be used in new code.

AlarmStatus Struct
IsActive TRUE if alarm is on the Active list
IsUnacked TRUE if alarm is on the Unacked list
IsShelved TRUE if alarm is on the Shelved list
IsDisabled TRUE if alarm is on the Disabled list
IsSuppressed TRUE if alarm is on the Suppressed list
IsSilentlySuppressed TRUE if alarm is suppressed but not on the Suppressed list

Variables within the structure may be accessed using either the dot notation or the backslash.

Example:

Monitor for when the alarm is active and unacknowledged, possibly to display a message.

 If Watch(1) Main;
  [
    AlmStatus = \AlarmManager\GetAlarmStatus(AlarmName);
  ]
...
Main [
  IfElse(AlmStatus.IsActive && AlmStatus.IsUnacked,
       ... { TRUE case  },
       ... { FALSE case });
]