×

Subscribe to newsletter

subscribe to our weekly newsletter to get notified with latest story and article Subscribe now!




PLC BLOG | CODESYS Alarm
Share on Facebook Share On Twitter Share on LinkedIn Share on Whatsapp


CODESYS Alarm Management and configuration

Alarm Is Main Function Or Tools In Automation, Process. Basically Alarm Is Concept Of Warning Of Any Process. You Can Define Various Alarm Events Of Process And These Alarm Events Helps The Operator To What Happens In Process. For Example Temperature Alarm Events, Network And Communication Alarm, Motor Alarm Group Like Current, Vibration, Torque Etc., Belt Conveyor Alarm Events And Many More Is Example Of Alarm Events. In Alarm Management You Can Also Set Priority Of Alarm To Which Alarm Come To Top Of Table.

    in codesys You configure your alarm management with the following objects:
  • alarm configuration
  • alarm classes
  • alarm storage
  • alarm group


how to configure alarm in codesys

For Configuration Of Alarm First Make a simple project.. If You New In Codesys Click On The link So You Can Understand How To Make A Simple Project In Codesys. after making a project make some logic of your program. i am adding a simple logic of timer.

simple ladder logic of alarm management

in above program when i set a bit to "stat_timer" than timer start. "timer_done" bit set to true when Elapsed Time (ET) is equal to preset time (PT) T#20s. for more information of codesys timer goto this link.
in second rung Elapsed Time (ET) is converted to integer value. for more about codesys data type press to link.
in third rung Elapsed Time (ET) Converted to integer data type.
in fourth rung i am division block . if you know more about codesys arithmetic instrunction block got to this link.


after making a ladder logic i am going to create Visualization of for making of Visualization in codesys got this link. here i am adding a "dip switch" for starting timer and "lamp" to show when timer done bit is true.

simple CODESYS VISUALIZATION of alarm management

Add alarm configuration in codesys project

after making ladder logic, and visualization next to define alarm configuration for project. for this Select an application in the device tree and than Add Object > Alarm configuration.

alarm configuration of codesys project

The Add Alarm Configuration dialog opens. click the Add button.

The Add Alarm Configuration dialog opens

alarm management is created with classes Error, Info, and Warning and the AlarmStorage below the alarm configuration.

alarm management is created

Configuring an alarm class in codesys alarm

after creating alarm management next step to configure alarm classes for this we three class
    alarm class is a properties of an alarm. these includes the priority and whether an archiving should take place.
  • Error class.
  • info class.
  • warning class.
first i am configure error class for this select application > Alarm Configuration > error class. double click on error class to configure parameter a window will open for configuration of class same apply for all classes.

codesys error alarm class

define following parameter for your alarm class.
  • Priority

    Specification of the priority of the alarms in this class (0–255). The priority describes the priority of the alarm condition. 0 represents the highest priority, 255 the lowest.
  • Archiving

    when you select this parameter The alarms of this class are recorded. To do this you have to create an Alarm Storage object.
  • Acknowledgment method

    define this property for insured user to acknowledge the alarm in order for the alarm to be removed from the alarm list.
    • REP: Alarm inactive after rectification.
    • ACK: Alarm inactive after acknowledgment.
    • REP_ACK: Alarm inactive after rectification of the cause and acknowledgment.
    • ACK_REP: Alarm inactive after acknowledgment and rectification of the cause
    • ACK_REP_ACK: Inactive after optional acknowledgment that the alarm was received, rectification of the cause and acknowledgment that the alarm situation was ended.
  • Acknowledge separately

    when you select so In runtime mode, the user cannot acknowledge the alarm together with other alarms, but must acknowledge it separately. This prevents the user from inadvertently acknowledging an alarm together with other alarms.
  • Display Options for Alarm Table/Alarm Banner

    Configures how the individual statuses of an alarm are displayed in the alarm visualization element (alarm table, alarm banner).
    • Status: status depend on the selected Acknowledgment method.
    • Font: select font, font-family, color etc for your alarm.
    • Background color: background color for your alarm
    • Bitmap: add a bitmap or image.
    • Transparent: Activate this option if the bitmap has a transparent color.
    • Transparent color: Color that is to be displayed transparently.

after selecting all the parameter of error class

so i am configure all these class look like below image

info class

after selecting all the parameter of error class

warning class

after selecting all the parameter of error class

add a alarm group in alarm

alarm is structur of alarm to how and when alarm show in the table. In the editor of the alarm group object, you define the individual alarms of the group with their properties in a table. Each alarm belongs to exactly one alarm group. for adding alarm group goto alarm configuration > add object > alarm group.

add alarm group in alarm

after add an alarm group open alarm group and add parameter,variable and statement of alarm.

  • Text List

    Name of the text list where the alarm message text is saved. "codesys automatic generated if not available."

  • Archiving

    Selection of the alarm storage object for the alarm group. When you specify an alarm storage object, CODESYS activates the alarm storage.

  • Deactivation

    Boolean variable that deactivates all alarms in this group. CODESYS does not trigger these alarms any longer, even if the alarm condition is fulfilled. Alarms that are already active are not affected by this.

  • Table of alarms

      individual alarms properties of variable in the corresponding table columns.

    • ID: it is unique ID to associated text list. if change the ID in the ID field of the table the alarm table also directly causes a change in the text list.

    • Observation Type: this field of table defines the condition of the alarm trigger.

    • Details: in this field you set the conditional settings of variable.

    • Deactivation: set the Variable for deactivating the alarm.

    • Class: set the alarm class which you defined(error,info,warning).

    • Message: set the message of an alarm. this message show when your alarm is triggered.

group settings for alarm

add alarm table in visualization

alarm table in visualization

after settings all the parameter go to visualization and add alarm table by selecting from toolbox.open visualization and add alarm table form alarm manager

add alarm table in codesys visualization

after adding all the parameter and settings run your project. as per logic and ladder logic you see when timer is not running a alarm table display an error message "start your timer" when we made dipswitch off to on timer start running when value of timer_value value is in between 1 to 6 alarm message display an warning alarm to "timer value is to low". when value between 7 to 16 info alarm triggered with message "timer value is ok". when value is greater than 17 error message triggered. so these are basic function of alarm management in codesys we discuss in more details like database of alarm and data logging in next article.

simulation of alarm in codesys project
 
Share on Facebook Share On Twitter Share on LinkedIn Share on Whatsapp


Suggested Post


 
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

comment