Tutorial: Apply Alarms

With eDESIGN it is possible to use prefabricated components. The component Alarms makes it relatively easy to trigger and acknowledge alarm states.

Definition of alarms

Go to the Alarms menu item

  1. Open the menu and go to the Alarms menu item
  2. A button appears in the upper left corner that says "New". Click on it and create a new alarm.

Configure alarm

Configure alarm

  1. Assign message number
  2. Select classification
  3. Enter alarm text (e.g. compressed air missing)
  4. Enter why (e.g. sensor B26.6)
  5. Enter reaction (e.g. machine stop)
  6. Enter correction (e.g. check sensor B26.6 for function)
  7. Save new created alarm

Create alarm in Codesys

PART 1:
Make the alarmingPrg (base program that takes care of initializing and observing the alarms changes). Important in current implementation is that the path of alarmingPrg is exactly “Application.alarmingPrg“.

Create alarm in Codesys

  1. Condition will be TRUE only on first cycle and will allow us to init the alarms
  2. This method call will initialize alarms definition from the database which was previously defined in STEP 1 or STEP 2 (Definition of alarms)
  3. Enable alarms history and set the cyclic buffer length to 100 000. The bigger the buffer is the larger will be the size of the history DB.
  4. Observe for alarm changes. This needs to run every cycle to check for changes and propagate them to HMI.
  5. Run alarm manager program for controling the behaviour of every alarm individually. See other screen for details.

PART 2:
Do not forget to adjust the Symbol Configuration. Only few variables are needed for the HMI to be read, but must be there. Otherwise the HMI will have no information about alarm changes in the PLC code.

Codesys Symbol Configuration

  1. First go to Symbol Configurations
  2. Under "alarmingPRG" select "alarming"
  3. For further details select the three points
  4. Publish onlv these 2 variables, more is not needed

PART 3:
Implementation of the individual alarm manager. Place where the conditions are defined.

Implementation of the individual alarm manager

  1. Example of an implementation of 1 alarm management (2 in the example project) IF condition THEN activate alarm ELSE deactivate alarm
  2. setActive with parameters. First one in message id (msgld), which you can find in the alarms definition table
    parameters 2-6 => params that can be passed into the alarm message title (explained in advanced alarming)
    parameters 7-11 => translation that can be passed into the alarm messages title
    parameter 12 (default 0, not present in the call) module id eDESIGN is prepared to have the same alarms on different modules

Implementation of the individual alarm manager

Integrate alarms

There are two options to view the alarms in eDESIGN:

Show alarm on the whole page

Option 1: Show alarm on the whole page

  1. Go to the Dashboard and create a new menu item for the front-end menu.
  2. Press "New" and create a new menu item.

Option 1: Show alarm on the whole page

  1. Assign title (displayed in the menu in the frontend)
  2. Specify Root
  3. If the menu item is not active, it is also not displayed
  4. You can specify an order
  5. Select icon for menu item
  6. Open subitem Components and select Alarms
  7. Save menu item

Go to the frontend and open the alarm page you have just created

Frontend alarm page

  1. Acknowledge the messages
  2. The configured alarms that have been set appear here

Insert alarm on any page

Insert alarm on any page

  1. Add the component from the toolbar to the page
  2. Click on Properties
  3. Select the alarm list
  4. Here you can enter additional parameters