Alarm Containers
In order for attached Alarm tags to contribute their values and alarm states to your custom tag, you must provide the variables to which they can connect.
ContributorAdded and ContributorDeleted
Declare "ContributorAdded" and "ContributorDeleted" as plugins:
[ (PLUGINS);
Shared ContributorAdded = "ContributorAdded";
Shared ContributorDeleted = "ContributorDeleted";
...
Required Variables
Declare all of the following variables:
{ List of variables handling points contributing to this one }
AlarmActive { This is an array of alarm priorities for all
active alarm contributors. Any alarm
contributors which are not active will set
their element to invalid. };
AlarmUnacked { This is an array of alarm priorities for all
unacknowledged alarm contributors. Any
acknowledged alarm will set its element to
invalid. This array is a 1 to 1
correspondence to the AlarmActive array. };
AlarmContributors { This is the "handle" used by the VTScada code
to maintain a list of the alarm contributors };
AlmSetpointPtrs { This is an array of Pointers to the setpoints
of each of the alarm contributors };
AlmPriorityPtrs { This is an array of Pointers to the
Priorities of each of the alarm contributors };
Configuration Panel, Alarm Tab
No additional variables are needed in the configuration module. The state where alarm contributors are shown and added will look like the following:
Alarm [
If Current != X Switch;
{***** Alarm contributor list *****}
GUITransform(80, 250, 420, 50,
1, 1, 1, 1, 1 { No scaling },
0, 0, 1, 0 { No movement; visible; reserved },
0, 0, 0 { Not selectable },
\DialogLibrary.PContributor("AlarmContributors" { holder },
\Root,
Parms[\#ContributionType] { contrib type },
"AlarmPoint" { point type },
\GetPhrase("AlarmContribLabel"), 1 { & 2 - ID }));
]