Using Latch Variables to Filter Alarm Events

Filtering by the contents of a latch variable can be useful when there are a lot of alarm events displayed. If the latch variable assigned to an alarm in its definition contains, for example, the error number or the name of a device instance, then the operator can filter the alarms in the visualization by it. The operator specifies a value, and this value is compared with the values of the latch variables of the alarms. Which type of value can be specified is controlled by a filter type variable.

In the CODESYS Store International, you will find the sample project "Alarm Filter Latch Example".

  1. In the application, define a variable which gets the value by which alarms can be filtered later.

    Example: The variable PLC_PRG.sFilter : STRING; for the entry of an error ID.

  2. In the same procedure, in the visualization, configure an input capability for the type of filtering (eFiltType). For example, insert another input element. By means of this element, the variable is written which exists in the Filter type property of the configuration of the alarm table or alarm banner.

TIP:

In the alarm group editor, you can edit the definition of the alarm message texts to include the entry of the latch variable value.