Skip to main content

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.

. The sample project includes the following:
  • Module declarations

  • Function block declarations

  • Device tree

  • Module tree

_ex_ac_img_alarming1.png

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:

  1. Check that the alarm generator (1) is enabled in the generator configuration.

    _ex_ac_img_alarming2.png
  2. Run a generation cycle (2) to create a functional alarm configuration.

    _ex_ac_img_alarming3.png
  3. 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.

_ex_ac_img_alarming4.png

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

_example_icon.png DOWNLOAD Projects