AlmEnable

Description:              This statement allows an alarm to be enabled or disabled in a specified entry in an alarm list.

Returns:                    Nothing

Usage:                       Script or Steady State

Format:                      AlmEnable(List, N, Enable, Disable, LowLevel, HighLevel, LowCategory, HighCategory)

Parameters:             List    { numeric }  { required }  { no default: }

                                                Any numeric expression giving the list number to search for the alarm. The valid list numbers are:

List

Meaning

0

Logged alarm list

1

Active alarm list

2

Unacknowledged alarm list

3

Current alarm list

 

                             You may add any of the following numbers to the specified list number to filter the selected list.

List

Attributes

4

Use combined alarm list

8

Don't include alarm occurrences in list

16

Don't include alarm clears in list

32

Don't include alarm acknowledges in list

64

Don't include alarm enables in list

128

Don't include alarm disables in list

 

                             N   { numeric }  { required }  { no default: }

                                                Any numeric expression giving the number of the entry in the list excluding the entries that do not fall within the bounds specified by the following parameters.

                                    Enable   { Boolean }  { required }  { no default: }

                                                Any numeric expression. A true value (non-zero) causes the specified alarm to be enabled regardless of the value of Disable.

                                    Disable   { Boolean }  { required }  { no default: }

                                                Any numeric expression. A true value causes the specified alarm to be disabled if the Enable parameter is false.

                                    LowLevel   { numeric }  { required }  { no default: }

                                                Any numeric expression giving the lower limit for the alarm priority level. If the alarm level is strictly below this value, the alarm is not included in the count specified by the N parameter.

                                    HighLevel   { numeric }  { required }  { no default: }

                                                Any numeric expression giving the upper limit for the alarm priority level. If the alarm level is strictly above this value, the alarm is not included in the count specified by the N parameter.

                                    LowCategory   { numeric }  { required }  { no default: }

                                                Any numeric expression giving the lower limit for the alarm category. If the alarm category is strictly below this value, the alarm is not included in the count specified by the N parameter.

                                    HighCategory   { numeric }  { required }  { no default: }

                                                Any numeric expression giving the upper limit for the alarm category. If the alarm category is strictly above this value, the alarm is not included in the count specified by the N parameter.

Comments:               If the entry specified does not exist, the AlmEnable statement has no effect. The Enable parameter overrides the Disable parameter. If both the Enable and Disable are false, the status of the alarm is unaffected. This statement has the effect of overriding the enable and disable parameters in the Alarm statement.

Example:

AlmEnable(3 { Current alarm list },

          1 { First entry },

          Toggle(MatchKeys(2,"E")) { Enable },

          ! Toggle(MatchKeys(2,"E")) { Disable },

          0 { Low priority },

          15 { High priority },

          0 { Low category },

          255 { High category });

The code in the example above toggles the enabled/disabled status of the earliest current alarm. It initially starts disabled. Each time the "E" key is pressed, the alarm changes state from enabled to disabled, or from disabled to enabled.

See Also:

Alarm | AlarmCat | AlarmInst | AlmAck | AlmAckID | AlmArray | AlmCatName | AlmColor | AlmList | AlmTone | NumAlarm