Create a Custom Flag for an Alarm Indicator
- Last UpdatedJul 18, 2023
- 3 minute read
An Use Alarm Indicators includes a flag that can be used to reflect the priority and current state of the most critical active alarm.
By default, this flag is constructed from the following set of Genies:
-
One Genie for each alarm priority that is flagged
-
One Genie for the Disabled/Shelved alarm mode.
To create a custom flag for an alarm indicator, you need to create the required Genies and assign them to the associated alarm priority or alarm mode.
Create a Genie to use as a flag
The Genie requires a root level object named "Shape".
-
In Graphics Builder, create a new Genie.
-
Add the object you would like use as an alarm flag.
-
Display the Properties dialog for the object.
-
On the Appearance | General tab, select Filled.
Note: If you are configuring a Genie for the Disabled/Shelved alarm mode, set the fill color you would like to use on the Appearance | General tab. You can then skip step 5 as the Genie will not need to change color.
-
On the Fill|Color tab, configure the following:
-
Set the Type to Array.
-
Enter the following Array Expression:
dspAnGetMetaData(dspGetAnCur(), "State")
-
Specify the Array Colors you want to use for 1 – 3, based to the following states:
1 = On and Unacknowledged
2 = Off and Unacknowledged
3 = On and Acknowledged
You can configure flashing colors via the Edit Favorite Colors Dialog Box, which is accessible via the Edit button on the Color Picker.
-
-
On the Access | General tab, enter the Name "Shape".
-
On the Metadata | General tab, enter the following items:
-
Name: Equipment; Value: <blank>
-
Name: Label; Value: <blank>
-
Name: State; Value: 0
Note: If you are configuring a Genie for the Disabled/Shelved alarm mode, replace "Name: State; Value: 0" with "Name: Priority; Value: <blank>".
-
-
Click OK.
Alarm flag Genies use functionality provided by the Cicode function DspSym. You need to perform the remaining steps to enable DspSym support for the Genie.
-
Display the Page Properties for the Genie. To do this:
On the File menu, select Properties.
Or:
Right-click on the Genie background and select Page Properties.
-
On the Page Properties dialog, select I want to use this Genie with the Cicode function DspSym.
-
Click OK.
-
Save the Genie to a library.
Note: When saving an alarm flag Genie, use a name that is unique across all included projects that share the same primary project.
Add a text label
The Genie can also include an optional text label. The procedure described below adds a text label that displays the Short Name specified for an Alarm Priority.
-
Add a text object to an alarm flag Genie.
-
Display the Text Properties dialog.
-
On the Appearance | Display Value tab, configure the following:
-
Set the Type to Numeric. This will allow you to specify the number of characters used for the text label.
-
Select the required Format for the label.
This should reflect the number of characters used for the Short Name specified in the Alarm Priority properties.
-
Enter the following Numeric Expression:
dspGetMetaDataFromName(".Shape", "Label")
-
-
On the Fill|Color tab, configure the following:
-
Set the Type to Array.
-
Enter the following Array Expression:
dspGetMetaDataFromName(".Shape", "State")
-
Specify the Array Colors you want to use for 1 – 3, based to the following states:
1 = On and Unacknowledged
2 = Off and Unacknowledged
3 = On and Acknowledged
-
-
Click OK.
-
Save the Genie.
Associate a Genie with an alarm priority
-
In Plant SCADA Studio's Setup activity, select Alarming.
-
On the menu below the Command Bar, select Alarm Priorities.
-
Locate the Alarm Priority you would like to associate with a Genie.
-
In the Genie Name field, enter the name of the Genie you would like to associate with the alarm priority.
-
In the Library Name field, enter the name of the library that includes the Genie.
-
Click Save.
Associate a Genie with the Shelved/Disabled alarm mode
-
In Plant SCADA Studio's Setup activity, select Alarming.
-
On the menu below the Command Bar, select Alarm Modes.
-
Locate the Shelved/Disabled mode in the Display Name column.
-
In the Genie Name field, enter the name of the Genie you would like to associate with the alarm mode.
-
In the Library Name field, enter the name of the library that includes the Genie.
-
Click Save.
Example
The default alarm flag Genies that are provided with Plant SCADA are located in the SA_Include project in a library called "sa_priorities". They are named as follows:
-
Priority 1 – "sa_p1_normal"
-
Priority 2 – "sa_p2_normal"
-
Priority 3 – sa_p3_normal"
-
Disabled/Shelved – "sa_disabled_normal".