Example: Alarms
Product: CODESYS Application Composer
This example shows how to use of the "Alarm Generator" feature which is integrated in the CODESYS Application Composer product. This feature is used when modules should have their own alarm configuration.
Description
The example contains a simplified simulation from the field of process automation and shows the capabilities of alarm generation within the CODESYS Application Composer. The simulated process represents a plant consisting of various pots, cooling equipment, sensors, conveyor belts, pipes, and a filling system.
Module declarations
Function block declarations
Device tree
Module tree
![]() |
For more information, see: Alarm Generator.
Additional information
To define an alarm in a module, you need to create alarm templates for alarm storage and the alarm classes to be used. In the module declaration, you insert and configure alarms in the alg.alarm
section. All module function blocks which should be notified automatically in case of alarm must implement the AC_Alarming.IModuleAlarming
interface. This interface includes the ConsumeModuleAlarm
method responsible for this. A detected alarm calls this interface method which includes information about the alarm and the type of alarm transition. This allows you to react to the different alarms or alarm transitions.
Then perform the following steps with the CODESYS Application Composer:
Check that the alarm generator (1) is enabled in the generator configuration.
Run a generation cycle (2) to create a functional alarm configuration.
Log in to the target system (for example, CODESYS Control Win) and start the application.
The objects and visualizations, including the alarm table, are created by the alarm generator. The alarms which occur are displayed on the visualization page created for this purpose, where they can also be confirmed.
![]() |
System requirements and restrictions
Programming system | CODESYS Development System (version 3.5.17.0 or higher) |
Runtime system | CODESYS Control Win (version 3.5.17.0) |
Add-on components | CODESYS Application Composer |
Note
DOWNLOAD Projects