01/13/2026
How To | PLC | HMI | Engineering

How-to use the Alarm Management from CODESYS

Introduction

This how-to focuses on the "Alarm Management" functionality provided by CODESYS within the ctrlX AUTOMATION platform. It covers setting up an alarm manager, defining alarm classes and groups, creating specific alarms, and displaying them in the HMI visualization.

Prerequisites

Used Hardware

  • ctrlX CORE X*-Serie or ctrlX COREvirtual

Used Versions and Required Software

Documentation

Setup Alarm Configuration

  1. To add the Alarm Configuration in your PLC project, first open the "ctrlX PLC Engineering" and ensure your project is loaded. In the project tree, select the “Application” node. Then click on “Add Object..” and choose “Alarm Configuration..” from the list. Afterward, enter a name according to your preference and click “OK” to confirm.

Fig. 1.: Adding an Alarm Configuration
  1. To add alarms and configure them we have to add an "Alarm Group". Therefore select the Alarm Configuration then navigate to "Add Object" there select the "Alarm Group" object.

Fig. 2.: Adding an Alarm Group

Create an Alarm

In the following steps, we will configure an alarm for the Emergency Stop button. To create this alarm we have to navigate to the "Alarm Group" in the "Alarm Configuration".

  1. In the "Alarm Group" choose the “Observation Type,” which defines the condition that triggers the alarm. In this example, we select “Digital”, because the Emergency Stop button provides a digital signal (TRUE/FALSE).

Fig. 3.: Selecting Observation Type
  1. The "Details" is where the specific condition for the trigger of an alarm is set. Therefore Double-click on “Configuration incomplete”, then click the input assistant button "…". In the open window, select the “Application”, navigate to "GVL_Alert", choose the variable "bEmergOffSwitchOpen", and confirm by clicking "OK".

Fig. 4.: Assignment of an Alarm Trigger Condition

  1. By default, the expression is set to TRUE. If necessary, you can change this in the expression field. In this example, we set it to FALSE because the emergency stop is considered active when the switch is OFF.

Fig. 5.: Configuration of Expression
  1. In "Deactivation" the condition under which the alarm will be reset or deactivated after it has been triggered is set. In this example, when the emergency stop button is released, the condition evaluates to FALSE, which deactivates the alarm. Therefore, we leave the "Deactivation" field empty because no additional condition is required.

    The "Class" is used to categorize the alarms based on their severity or importance. There are three different classes:

    • Information – For non-critical or status updates.

    • Warning – Indicates a potential issue that requires attention but is not critical.

    • Error – Represents a fault or critical condition that needs immediate action.

    For the emergency stop , we select the class “Error” because it indicates a critical event.

Fig. 6.: Class Selection
  1. The "Message" field defines the text shown when the alarm is triggered. It should clearly state the problem and its location so the operator can understand it immediately. The "On-Delay Time" defines the time that an alarm condition must remain True before the alarm is activated. The "Off-Delay Time" defines the time that an alarm condition must remain False before the alarm is deactivated. In this example, On-Delay and Off-Delay times are not configured.

Fig. 7.: Alarm Message & On/Off-Delay Time
  • Message: Emergency Switch activated! Please reset it if the situation is Safe!!

  • Delay Time Notation:

    • T#5s = 5 seconds

    • T#5ms = 5 milliseconds

  1. The "Latch Var" are used to extend alarm messages and filter alarm events. The "Higher Prio. Alarm" option allows an alarm to be acknowledged automatically when a higher-priority alarm is triggered.

Fig. 8.: Latch Variable & Higher Priority Settings

Further Information:

  1. In our example, we have extended the alarm list by adding several new alarms to monitor critical system states and axis conditions.

    Fig. 9.: Example Alarm Group with Digital and Limit Observations

Alarm Class Configuration

Under Alarm Configuration, you will find the predefined alarm classes: "Error", "Warning", and "Info". Select a class (e.g., "Error") to customize its behavior.

Fig. 10.: Alarm Classes Error, Info and Warning
  1. Within the "Error" class, you can define the "Priority", which is used to filter or restrict the displayed classes in the "Alarm Table". Enable the "Archiving" checkbox to ensure that alarms are logged in the "Alarm History". For the "Acknowledgment method", select "Rep_Ack". Additionally, configure the confirmation to use "Acknowledge instead of Confirm".

    The "Notification Actions" are not used in this example.

Fig. 11.: Configuration of the Error Class

Further Information:

  1. To change the Font, double-click the desired field and click the "..." button. A font window will appear where the adjustment of type, size, and style can be done. To change the Background Color use the same steps.

Fig. 12.: Error Class Font Display Options
  1. To create a custom "Bitmap" symbol, first enter your desired name and press "Enter". This will open an insert window where you can select your image file. After choosing the image, click "Open" to confirm.

Fig. 13.: Error Class Bitmap Display Options
  • Bitmap Icon Error:

    Error_Alarmmanager.jpg
    51.67KB

Error Class

All the configuration steps of the "Error" class which were described above—such as setting priority, acknowledgment method, state transitions, notification actions, details, and display options are visible in this view.

Fig. 14.: Error Class Configuration Overview

Warning Class

These are the configuration settings used for the "Warning" class in this example.

Fig. 15.: Warning Class Configuration Overview
  • Bitmap Icon Warning:

    Warning_Alarmmanger.jpg
    49.38KB

Info Class

These are the configuration settings used for the "Info" class in this example.

Fig. 16.: Info Class Configuration Overview
  • Bitmap Icon Info:

    Info_Alarmmanger.jpg
    41.65KB

Visualization

To visualize active alarms, you can use either the "Alarm Banner", which displays a single alarm, or the "Alarm Table", which lists multiple alarms. Below is a brief explanation of how to edit the table columns.

  1. To add a visualization to your application, right-click on the Application node in the project tree, select "Add Object", and then choose "Visualization".

Fig. 17.: Adding an Visualization Object
  1. Open the visualization. In the "Visualization Toolbox", locate the "Alarm Manager" section and drag the "Alarm Table" onto the visualization canvas.

Fig. 18.: Adding an Alarm Table into the Visualization
  1. To view the visualization while the PLC is running, you need to add a "Web Visualization" to the "Visualization Manager". To do this, right-click the "Visualization Manager", select "Add Object", and then choose "Web Visu".

    Fig. 19.: Adding an WebVisu to the Visualization Manager

Configuration

  1. Select the "Alarm Table" on the canvas to open its Properties. Under "General table configuration", you can enable "Automatic line break for alarm message" to ensure long messages are fully visible. There it is also possible to change the Row height.

    In the "Columns" property, you can configure what information is displayed .Click "Create New" to add columns for "Class", "Timestamp", "Message", "Timestamp active", and "State".

Fig. 20.: Alarm Table General Table configuration
  1. For each column, you can set the header text, width, type of data, and text alignment. The picture below shows the configuration of the columns in this example.

    Fig. 21.: Alarm Table Column Configuration

    After doing the configuration the "Alarm Table" in this example look like this.

    Fig. 22.: Alarm Table Column Overview
  2. To add acknowledgments Buttons right-click the "Alarm Table" in your visualization and select "Insert elements for acknowledging alarms...".

    Fig. 23.: Adding Acknowledgment elements to the Alarm Table

    There it is possible to select the according “Actions” and to confirm your selection press “OK”.

    Fig. 24.: Selection of Alarm Table Acknowledgment Buttons
  3. The visual difference between the "Alarm Banner" and the "Alarm Table" is clearly visible in the picture below.

    Fig. 25.: Comparison between the Alarm Banner and Alarm Table

Related links

Alarmmanager.zip
824.97KB
Types
How-to
Products
Controls
PLC
HMI
Markets
Manufacturing
Assembly Lines
Building Automation
Logistic
Printing
Packaging
Production Machines
Robotics

Latest published/updated articles