# Alarm Occurrence

The Alarm Occurrence trigger runs the operation, when a configured alarm group or system error group satisfies the severity conditions.

##### Block

##### Text

All

onAnyAlarm($Enums.AlarmOperator.Equals, 1, ()=>{
1 2 3
});

AlarmGroup

onAlarm($AlarmGroup.AlarmGroup1,$Enums.AlarmOperator.Equals, 1,()=>{
1 1 2 3

});

SystemErrorGroup

onAnySystemError(()=>{
1
});

1. Group

2. Condition

3. Severity

Group | Select the alarm group or system error group. ##### Block [AlarmGroup1] (Name of the alarm group) [All] [SystemErrorGroup] ##### Text 'onAlarm' 'onAnyAlarm' 'onAnySystemError'
Condition | Select the condition. ##### Block [==] [<=] [>=] [When Occur] ##### Text '$Enums.AlarmOperator.Equals' '$Enums.AlarmOperator.LessThanOrEquals' '$Enums.AlarmOperator.GreaterThanOrEquals' '$Enums.AlarmOperator.WhenOccur'
[Severity] | Set the severity level for the selected alarm group. Range: 0 - 999

(Example 1)

In AlarmGroup1, when an alarm of severity 5 occurs, Var1 turns ON.

##### Block

##### Text

onAlarm($AlarmGroup.AlarmGroup1,$Enums.AlarmOperator.Equals, 5, ()=>{

Var1 = true;

});

(Example 2)

In AlarmGroup1, when an alarm occurs, Var1 turns ON.

##### Block

##### Text

onAlarm($AlarmGroup.AlarmGroup1,$Enums.AlarmOperator.WhenOccur, ()=>{

Var1 = true;

});