GetAlarmConfiguration
(Alarm Manager module)
Description: |
Returns a copy of an alarm's configuration structure, returning an unpopulated structure it does not already exist. |
Returns: |
Structure (see comments) |
Usage:  |
Script Only. |
Function Groups: |
Alarm |
Related to: |
Commission | GetAlarmStatus |
Format:  |
\AlarmManager\GetAlarmConfiguration(AlarmName) |
Parameters: |
|
AlarmName |
Required text. The alarm name. Typically, the unique id of the alarm tag, or the tag containing built-in alarms. |
Comments: |
GetAlarmConfiguration should be called before commissioning an alarm. This will create an alarm structure that can be populated for the call to \AlarmManager\Commission().
An alarm has the following configuration structure:
Name |
Unique name for the alarm. Typically the unique ID. If there are multiple built-in alarms in a tag, the convention is to concatenate the UniqueID with a separator and a unique integer per alarm. For example, Concat(Root\UniqueID, \AlarmSeparatorString, 0). |
FriendlyName |
Obsolete |
Area |
Area |
DescPhraseID |
Description. See also: NoLegacyAlarmDesc |
Priority |
Priority. Must be valid to be commissioned. Must be an integer corresponding to the Alarm Priority tag values. A priority of 0 will be treated as an event and will not go on either the Active or Current lists. |
Reserved |
|
Disable |
TRUE to disable the alarm |
DisableParmName |
Name of the tag's disable parm. Allows us to get the operator name who made the config change. |
OnDelay |
Seconds to delay before activating |
OffDelay |
Seconds to delay before clearing |
RearmDelay |
Seconds to delay before rearming after ack |
Setpoint |
Setpoint of alarm evaluation. The value is compared against the setpoint. |
ValueLabels |
Array of labels to display instead of Value or Setpoint. Rarely used by tags other than digitals. |
Units |
Setpoint units |
Function |
Enumerated function for alarm evaluation. See: Alarm Manager Function Constants |
AlarmType |
String identifying the type of alarm. Used for display purposes only, in accordance with the ISA18.2 standard. Examples include "Low", "High", "Test". |
Trip |
TRUE if alarm only becomes unacked not active |
NormalTrip |
TRUE if alarm becomes unacked when it clears |
OffNormal |
TRUE if alarm only becomes active not unacked |
Deadband |
Setpoint deadband |
PopupEnable |
TRUE to enable popup display of active alarm |
SoundFile |
Filename relative to app path of custom sound |
Custom |
Number/String/Array/Structure containing custom data. This information is not shown anywhere on the AlarmPage by default, but could be displayed using a custom column. |
AdHoc |
TRUE if alarm is ad hoc |
ReactivateOnValueChange |
If TRUE, the alarm will reactivate whenever the reported value changes. |
|
Example:
The following would typically be found in a tag's Refresh state.
IfElse(Valid(Name), Execute( { create or obtain the configuration structure for this alarm }
Cfg = \AlarmManager\GetAlarmConfiguration(UniqueID);
{ update the property values in that structure }
Cfg\Name = Root\UniqueID;
Cfg\Area = AreaValue;
Cfg\Priority = PriorityValue;
Cfg\Setpoint = 1;
Cfg\Function = \AlarmManager\ALM_FUNC_EQUAL;
{ commission (or update the commission of) the alarm }
\AlarmManager\Commission(Root, Cfg, Value);
);
);
Related information:
(1)Function constants are documented in: Alarm Manager Function Constants
Trihedral and VTScada are registered trade marks of Trihedral Engineering Limited
© Trihedral Engineering Limited 1983- 2021 All rights reserved.