Active
Deprecated. Do not use in new code.
(Alarm Manager module)
Description: | Tells the Alarm Manager to activate an alarm. This subroutine will activate an alarm and signal it as unacknowledged. |
Returns: | 0 |
Usage: | Script Only. |
Function Groups: | Alarm |
Related to: | Register (Alarm Manager) (Alarm Manager) | CurrentTime | Normal | IsActive |
Format: | \AlarmManager\Active(AlarmObject[, EventTime]); |
Parameters: |
AlarmObject |
Required. Object Value for the alarm that was passed to the active Register subroutine. |
EventTime |
Optional, Timestamp to use when adding this event to the alarm lists. Defaults to CurrentTime() |
Comments: | The Active subroutine always returns "0". |
Examples:
To avoid an IF 1 condition when activating an alarm, it is common practice to include a variable to ensure that the script runs only once. This should take its value from the current alarm state.
Init [ AlarmOn = AlarmManager\IsActive(MyAlarm); ] Main [ IF value >= SomeSetpoint && ! AlarmOn; [ AlarmOn = 1; AlarmManager\Active(MyAlarmObj); ]