Set the alarms¶
Create an alarm object
In Project, right-click Alarms, select New, then select the desired alarm: the alarm appears in Alarms.
In the Input value property, set the variable to monitor
Set the normal value status or the limits, depending on the alarm type.
In the Message property, set the message to display on activation of the alarm.
In the Severity property, set the alarm criticality/priority level on a scale from 1 to 1000.
Note
the scale is in conformance with the OPC UA standard.
Set the Enabled property.
(Optional) Customize alarm management.
Create and configure a custom alarm type
(Optional) Add custom property:
In the alarm Properties panel, click , then select Variable: the new property appears.
Rename the property, set the data type and value, typically via dynamic link to the node with the information of interest.
Repeat the two previous steps for each custom property to add.
Drag the alarm from the Project panel into the Alarms folder in the Types panel:
a new alarm type is created
the new type also appears in the same folder in Project, identified by the “(type)” suffix
the original alarm automatically becomes an instance of the new type.
Customize alarm management
If simpler alarm management is required, the user intervention at runtime can be reduced, automating the step from one status to another:
If at runtime… |
Then set… |
---|---|
only acknowledgment of the alarm is required |
the Automatic confirmation property on True: at runtime the alarm is automatically confirmed. In the Alarms grid (see Alarms grid), the alarm is displayed only while active and not acknowledged. |
we want to avoid alarm management |
the Automatic confirmation and Automatic acknowledgment properties on True. At runtime, the alarm is automatically confirmed and acknowledged. In the Alarms grid (see Alarms grid), the alarm is displayed only while active and is automatically removed when it stops. |
Set a message with dynamic values
To enter information generated only at runtime in the message, for example the current value of a temperature variable, use a converter.
Below is an example in which a message that includes the value of the monitored variable is configured:
In the alarm Message property, click , then click Advanced: the advanced dynamic link editor opens.
Click and select String formatter: the relative editor opens (see String formatter).
Set as source (DynamicLink) the Input value variable of the alarm.
In the Format field, enter the text of the alarm message, and inside use the placeholder {0} which identifies the value of the source variable.
Click to set the direction of the link on (read).
Note
to localize a message with dynamic values, see Localize an alarm message.
Localize an alarm message
The message displayed in the widgets (Message property of the alarms) is a string translatable through a LocalizationDictionary (see Translations). If there are translations in the different languages for a string, in multilingual applications at runtime the alarm message is displayed in the language of the session user (see Locale).
In the alarm Message property, enter the text of the message to display/expose at runtime.
In Project > Translations, double-click the available LocalizationDictionary: the translations editor appears.
Click View Translation References. In the editor, the alarm message text is displayed in the String column.
In the alarm message row, select the Synchronize box: a corresponding translation key is created.
Click Display translation Table*.
Adds the desired translation for the different locales (see Manage the translations).
Activate alarm branching
In Project, click the project node.
In Properties, set Alarm branching to True.
See also
Related concepts
Application examples
Configure an alarm associated with the change of temperature
References