Skip to main content

Alarm Generator

The alarm generator provides the module developer with an easy way to equip existing modules with the alarm management available in CODESYS. In doing so, functionalities for the complete alarm management, as well as a corresponding visualization, are generated.

The new module declaration (alg.Alarm) implements this feature. All definitions necessary for the alarm management are set in there.

Alarm generation

Like all generators of the CODESYS Application Composer, this generator can be activated or deactivated in the Generator configuration.

The generator performs the following steps:

  1. An alarm configuration object is searched for, so that it can be used for the next generation. If no alarm configuration object exists, a new one is created.

  2. Under the alarm configuration object, an alarm storage object is searched for. If no alarm storage object exists, the alarm storage template is used. This template is defined in the alarm generator settings. If the option No Storage is selected no alarm storage template is used and the process is continued without alarm storage. If more than one template is found, an error message is displayed.

  3. Under the alarm configuration object is searched for alarm class objects that have the name defined in any module description under the definition alg.Alarm.SetAlarm.Class . If the corresponding alarm class objects are found, they will be used. If no corresponding alarm class is found, an attempt is made to create a new one. This requires that the alarm class template object of corresponding name exists as a template in the POU pool of the project or a referenced library, so that it can be used as an alarm class template. If no matching alarm class template object is available, an error is displayed.

Creating the visualization

Together with the alarm generation, an alarm visualization screen is created, which is a suggestion for an overview visualization (alarm table) of the alarms in the project. The template for this visualization is set in the alarm generator settings.

If the visualization generator is active, the created or re-used visualization object is integrated as a tab in the top-level visualization.