Create alarms
To be able to create alarms, you need a variable from the PLC that is to trigger the alarm in the visualisation. Instead of a real process variable, you will create an internal variable in the following instructions, i.e. a variable that is defined in the Variables system module but has no counterpart in a PLC. You can manipulate the variable value using input controls in the application and thus trigger alarms.
-
To create an alarm:
-
Create a new internal variable in your project.
-
Expand the project explorer node VariablesWChannels.
-
The table editor is opened in the workspace.
-
Right-click on the table editor and select New in the context menu that opens.
-
Double-click on the Internal node it contains.
-
Under Alias, enter the name "AlarmSource" for the new variable.
A new internal variable with the data type VT_I2 (value range: -32768 - +32767) was created. Some of the 16 available bits are used as triggering bits in step E.
-
-
Create a new alarm group.
In (Undefined variable: docInfo_DE.Produktname), each alarm must belong to an alarm group.
-
Expand the Alarms node.
-
Select the Alarm groups node it contains.
-
Right-click and select New from the context menu.
A new alarm group with the name "Alarm group1" has been created and the table editor opens. You can now create the individual alarms in the group.
-
-
Create eight alarms in the alarm group.
-
Click in the upper area of the table editor. Alarm definitions are created here. The lower area is responsible for alarm groups within the current alarm group (subgroups).
-
Press F8 eight times in succession.
Eight new alarm definitions have been created and appear as rows in the table editor.
-
-
Create the triggering variable (event variable) for each alarm.
-
In the first row, click on the cell in the Event variable column.
The button
appears in the cell. -
Click on the button
.The Select variabledialogue appears.
-
Expand the Internal node in the dialogue.
-
Select the AlarmSource variable.
-
Confirm with OK.
The AlarmSource variable appears in the "Event variable" column of the first alarm definition.
-
Specify the same event variable in the other seven alarm definitions.
Use the Fill table editor function to apply a parameter value to all selected definitions:
-
Select the cell whose parameter value you want to use for other definitions.
-
Expand the selection to the area of the column for which you want to apply the parameter value (using the mouse or a keyboard command).
-
Right-click and select Fill in the context menu or press Ctrl+U.
-
In each of the eight alarm definitions, the AlarmSource variable is now specified as the alarm-triggering variable.
-
-
For each alarm definition, enter the bit number that is to trigger the alarm.
-
Enter the value 0 for Alarm1 in the "Bit number" column.
-
Increase the value for Alarm2... Alarm8by 1 in each case.
Use the table editor function "Increment 1" to increase the parameter value by 1 for all selected definitions:
-
Select the cell whose parameter value you want to increase by 1 for other definitions.
-
Extend the selection to the area of the column for which you want to increase the parameter value by 1 (using the mouse or a keyboard command).
-
Right-click and select increment 1 in the context menu or press Ctrl+1.
-
The respective bit that is to trigger the alarm is now specified in each of the eight alarm definitions.
In (Undefined variable: docInfo_DE.Produktname), each alarm must now be assigned to an alarm class.
-
-
Specify the alarm class for each alarm definition:
-
Select "Alarm" in the "Alarm class" column for alarms 1 ... 3.
-
Select the "Warning" alarm class for alarms 4 ... 6.
-
Select the "Info" alarm class for alarms 7 ... 8.
The "Alarm", "Warning" and "Info" classes are already defined in the project. These can be found in the project explorer node AlarmsWAlarm classes.
-