Object ‘Alarm group’

Use alarm groups for organizing individual alarms in the alarm management of an application. Each alarm is assigned to one alarm group only. To configure an alarm group, insert an Alarm group object below an Alarm configuration object in the device tree.

A common deactivation variable can be assigned to all alarms that are assigned to a group. You can create a hierarchical structure of alarm groups in the device tree with the help of folder elements.

The dialog of the alarm group editor includes a table listing all alarms of the group. The dialog displays the basic settings for the entire group, such as deactivation, archiving, and associated text list, as well as the properties of the individual alarms. You can edit the values in the list. Please note the option of exporting and importing alarms to and from a CSV file (see below).

Dialog ‘Alarm Group’

Text list Name of the text list where the alarm message text is saved (see below: Message). CODESYS generates the list automatically when you create an alarm group. You can also select an existing text list here.
Archiving Selection of the alarm storage object for the alarm group. When you specify an alarm storage object, CODESYS activates the alarm storage.
Deactivation Boolean variable that deactivates all alarms in this group. CODESYS does not trigger these alarms any longer, even if the alarm condition is fulfilled. Alarms that are already active are not affected by this.
Alarm table
You enter the properties of the individual alarms in the corresponding table columns. Depending on the selected monitoring type, CODESYS sets additional parameters in input fields below the table.
ID This unique ID corresponds to the ID of the associated text list. You can change the ID in the ID field of the table. The ID must always be unique within the alarm group. A change of the ID in the alarm table also directly causes a change in the text list and vice versa.
Monitoring type Monitoring type drop-down list. Depending on the type, different editing fields are available below the table that define the condition for the alarm. The fields define an expression that triggers the alarm. See the following table.
Details

This field shows the configuration settings (defined in the fields below the table) for the selected alarm type.

You can also enter the condition directly into the field. If you input an expression that does not match the currently selected monitoring type, the type is automatically adapted.

Deactivation Variable for deactivating the alarm (optional).
Class Assigned alarm class.
Message Required entry of a message text (message) that CODESYS will display in the Alarm table visualization element when the alarm occurs. The text entered here is transferred automatically by CODESYS to the text list for the alarm group. You can insert line breaks by pressing Ctrl+Enter. CODESYS supports the following placeholders, which are replaced by the actual value at runtime:
  <DATE> Date of the change to the present status.
  <TIME> Time of the last status change.
  <EXPRESSION> Expression (defined within the alarm) that triggered the alarm.
  <PRIORITY> Priority of the alarm (defined in the alarm class).
  <TRIGGERVALUE> * Value that caused the alarm condition to become true.
  <ALARMID> Alarm ID as displayed in the first column of the alarm table.
  <CLASS> Name of the alarm class (defined in the alarm).
  <ALLDEFAULT> Complete information about the alarm is output.
  <CURRENTVALUE> * Actual value of the monitored variable.
  <LATCH1> * Value of the first latch variable at the time when the alarm was triggered.
  <LATCH2> * Value of the second latch variable at the time when the alarm was triggered.
  <ALARM> TRUE in the case of the alarm status ‘Active’, FALSE with every other alarm status.
  <STATE> Alarm status: 0 = “normal”, 1 = “active”, 2 = “waiting for ACK”, 3 = “active, acknowledged”
 

* For <TRIGGERVALUE>, <CURRENTVALUE>, and <LATCHn>, you can also use formatting specifications, such as those that are valid for the C function “printf” (example: “The value is <CURRENTVALUE %d>”.

By default, only one column is available for message text. You can add more columns from the context menu which will be available in the Data type property for column configuration of the Alarm table and Alarm banner visualization elements.

Min. pending time:

Defines the minimum duration for fulfilling the alarm condition so that CODESYS triggers the alarm. In this way, CODESYS can inhibit alarm conditions that occur only for a short time.

IEC 61131 compliant format (example: t#2ms).

Latch var 1, Latch var 2

The latch variables are used for recording two additional values when the alarm becomes active. A latch variable has to be a scalar type (8-byte) or a STRING or WSTRING type. CODESYS records a latch variable or a latch expression when the alarm becomes active. In this way, it allows additional information about the alarm to be provided.

Example: When monitoring a motor speed, the temperature and the current are additionally recorded.

By default, columns are available for two latch variables. You can add more columns from the context menu which will be available in the Data type property for column configuration of the Alarm table and Alarm banner visualization elements.

Higher prio. alarm

When the alarm is triggered, it can be acknowledged by triggering another alarm.

Example: A temperature monitor should print a warning at > 60 °C and an error at > 90 °C. If the temperature rises, then the warning is displayed starting at 60 °C. At 90 °C and higher, the alarm for the error is triggered (this automatically acknowledges the 60 °C warning).

Observation types
Digital: Expression: Expression to be monitored. On the right side of the expression for the comparison. In the center, you select the desired comparison operator (= or <>).
Upper limit1): Expression: As described for Digital, but with the compare options > or >= and optionally a Hysteresis in %.
Lower limit1): Expression: As described for Digital, but with the compare options < or <= and optionally a Hysteresis in %.
Inside range1):

Expression: Expression to be monitored.

Range: CODESYS triggers the alarm when the monitored expression is within the range defined here. The left field defines an expression for the lower limit of this range. The right field defines an expression for the upper limit. The expression to be monitored is displayed in the field in-between. You must set the comparison operators accordingly. You can define a Hysteresis in % optionally.

Outside range1):

Expression: Expression to be monitored.

Range: CODESYS triggers the alarm when the monitored expression is outside the range defined here. The left field defines an expression for the lower limit of this range. The right field defines an expression for the upper limit. The expression to be monitored is displayed in the field in-between. You must set the comparison operators accordingly. You can define a Hysteresis in % optionally.

Change: Expression: Expression to be monitored. CODESYS triggers the alarm when its value changes.
Event: In this case, the application triggers the alarm (event alarm) by using functions from the library AlarmManager.library.

1) For this monitoring type, you can monitor the specified expression as absolute or relative. Absolute means that the limit value is defined by a fixed value or a variable that returns a fixed value. Relative means that the limit value depends on an expression; for example: upper limit: Variable x >= 0.9 * y.

Hysteresis in %: if you specify a hysteresis, the alarm condition is fulfilled until a certain deviation from the specified limit value is reached. The size of the deviation is specified as a percentage [%] of the limit value. Example: Upper limit: i_temp >= 30 Hysteresis: 10%. The alarm is active when the variable i_temp reaches or exceeds the value 30. The alarm is no longer active if the value falls below 27.

The context menu includes the following commands for adding and removing additional columns for messages and latch variables:

  • Add message column
  • Remove message column
  • Add latch var column
  • Remove latch var column

See also

Exporting and importing alarms

In the context menu of the alarm table you will find commands for the export and import of alarms to and from a CSV file:

  • Export alarms: This command opens the standard dialog for saving a file in the file system. The default file type is Alarm group export file (*.csv). This way you can export the current alarm list to a csv file.
  • Import alarms: This command opens the standard dialog for searching for a file in the file system. The default file type is Alarm group export file (*.csv) for describing alarm definitions.