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. |
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.
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 }); ]