Attribute: alarmgroup_default
Syntax:
{attribute 'alarmgroup_default' := 'MyDefaultAlarmGroup'}
When creating new alarm instances, the attribute pragma can be used to define an alarm group instead of the default group AlarmGroupInstance. This attribute can be defined for instance variables, function blocks with associated alarm group templates, or their base function blocks.
It can be defined for the following:
Alarm instance variables
Function blocks with associated alarm group templates
Base function blocks
Regarding priority
The definition at a variable has the highest priority and overrides a definition at an extended function block. A definition at an extended function block overrides the definition at its base function block.
For more information, see the following: Alarm Configuration
PROGRAM PLC_PRG
VAR
fbSub1a : ARRAY[0..1] OF FbInstSub1;
{attribute 'alarmgroup_default' := 'AlarmGroupVar2'}
fbSub1b : FbInstSub1;
{attribute 'alarmgroup_default' := 'AlarmGroupVar'}
fbSub2a : ARRAY[0..2] OF FbInstSub2;
fbSub2b : FbInstSub2;
END_VAR