Alarms
Alarms are a core component of the PLC Visu system, designed to help monitor, log, and react to system events. The Alarm feature is composed of three main modules:
Alarm Administration (Editor/Admin Section)
This is where alarms are defined and configured. It allows administrators to:
- Create and manage the list of possible alarms.
- Categorize each alarm.
- Set essential metadata such as msgId, Title, and Inactive Title.
- Use placeholders and translations for dynamic and localized messages.
Alarms Front-End (User Interface)
This module is responsible for:
- Displaying active and historical alarms to users.
- Providing acknowledgment controls for alarms requiring confirmation.
- Showing localized and parameterized messages as alarms occur.
To visualize alarms in the user interface, there are multiple options:
- Menu Integration: Add an entry in the Menu component and link it to one of the alarm views:
- Alarms – shows currently active alarms.
- Alarms History – displays historical alarms.
- Alarms Overall – a tabbed view combining both current and historical alarms.
- Widget Control: Use the Widgets in the Page Editor and set its type to Alarm List to embed the current alarm view directly into a page.
Codesys Back-End
The Codesys integration handles the activation and deactivation of alarms within the PLC logic. It interfaces directly with the alarm front-end via variable binding.
Required Libraries
To use alarms in your Codesys project, you must include:
- PLCVisu – Framework for communication and UI support
- ELA_MessageSystem – The core alarm handling library -> this is included under PLCVisu library
For more details see screenshot:

Symbol Configuration in Codesys
To enable alarm communication between Codesys and the HMI, you must expose alarm-related variables in the Symbol Configuration. These variables must be selected and made available for external access.

Make sure that all necessary alarm structures and variables are enabled for external access; otherwise, the alarms will not be shown correctly in the HMI.
Alarm Implementation
alarmPrg
PLC program that handles the inicialization of the alarms and also the events. This is usually included in the PLC_PRG or can be placed directly into the separate task.
alarmingManagerPrg
The program where the actual logic for activating and deactivating alarms is happening.
setActive
Activates an alarm with optional parameters and translation placeholders:
setActive(msgId : UINT, param1 : STRING := '', param2 : STRING := '', param3 : STRING := '', param4 : STRING := '', param5 : STRING := '', trans1 : STRING := '', trans2 : STRING := '', trans3 : STRING := '', trans4 : STRING := '', trans5 : STRING := '', moduleId : UINT := 0);
setInactive
Deactivates a previously active alarm:
setInactive(msgId : UINT, moduleIndex : UINT := 0, tag : STRING := '');
manage
Provides trigger as input parameter and is replacing setActive and setInactive.
alarmingPrg.alarming.manage(444, iErrorTrigger > 95);
These methods are typically called from a structured alarm manager program like alarmManagerPrg.
