Skip to main content

Alarm Display in Online Mode

In online mode, you can influence how the alarms are displayed in the following ways:

Filtering the alarms by the value of latch variables which provide specific information about the alarm

Using Latch Variables to Filter Alarm Events

Displaying the alarm events for an explicitly defined period of time

Displaying Alarm Events for a Specific Time

Deleting the alarm history

Deleting the Alarm History

In the alarm banner: Scrolling through the active alarms

Adding Elements for Scrolling the Active Alarms

Messages are not saved as a copy in the history.

Effect: If you make a small change to a message (for example, correcting a typing error), then this change has an effect on the history because the corrected message is now displayed there. However, if you completely reconfigure the alarm (change status or condition and update the message), then all previous alarms which were recorded due to the outdated configuration will get the new message in the history. Check on a case-by-case basis whether it is not better to add a new alarm instead of upgrading the outdated alarm.

For more information, see: Evaluating Alarm Information in the Program Code

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.

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

    Example of entering an error ID: PLC_PRG.sFilter : STRING;

  2. In the configuration of the individual alarms, assign one or more latch variables which contain additional information about the alarm.

    Example of the current engine temperature: rEngineTemperature

    For the current speed: rEngineSpeed

    For the error ID: strError

    You can also use more than the two default latch variables for additional information about the alarm. To do this, use the context menu to insert additional columns in the table of the alarm group editor.

  3. Define an additional integer variable to define the filter type which the visualization user can specify for filtering the alarms, and how this is interpreted.

    Example: eFiltType : VisuElemsAlarm.EFilterLatchContent;

    EfilterLatchContent is an enumeration defined in the library AlarmManager with the following filter types:

    • 0: No filtering

    • 1: Filtering by alarms whose latch variable 1 contains the string specified in the filter variable.

      For example, you can search for 'Error 1' (filter variable) in latch variables (type STRING).

    • 2: Filtering by alarms whose latch variable 1 contains the typed literal specified in filter variable according to IEC 61131-3.

      You can search for T#1h2s, DINT#15, REAL#1.5, or FALSE.

    • 3: Filtering by alarms whose latch variable 1 contains the LINT literal value specified in filter variable. Therefore, the value of the latch variables has to be in the range of 9,223,372,036,854,775,808 to 9,223,372,036,854,775,807.

    • For all other values, the behavior is currently not defined.

    Only those alarms are displayed which match the search criterion specified in the filter variable in the latch variables.

  4. Configure an input option in the alarm visualization for the contents of the latch variable to be filtered by. For example, add an input field where the user can enter the value to be filtered by. To do this, use an input configuration with the Write Variable action and enter the filter variable PLC_PRG.sFilter defined in Step 1 above. Example: PLC_PRG.sFilter. Then the alarm visualization reads this as a filter variable.

    In the properties of the alarm visualization element, in the Alarm configurationFilter by latch 1FilterVariable property, enter this variable accordingly (example: enter PLC_PRG.sFilter again).

    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.

    For more information, see: Alarm Configuration

  5. 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.

    Behavior in the event of an unacknowledged alarm

    If a latch variable is used in the alarm group in the alarm configuration (for example, for an INT variable of a parameterized error message), then the current value of the INT variable is archived in the latch variable. The archived value changes again only after the corresponding error message has been acknowledged. The value of a latch variable is always updated when the alarm changes to the active state.

    As a result, several consecutive error messages that have not yet been acknowledged get the incorrectly archived value. This applies not only to the initial transition to the active state, but also when a re-alarm is triggered, for example.

Displaying Alarm Events for a Specific Time

In many cases, it is known in which time period the problems occurred and these were recorded as alarms. Then it can be useful to display only those alarms that occurred within the specified time period. The important information is displayed optimally and found more quickly.

In the alarm visualization, you configure two input options for variables, which are located in the configuration of the Alarm Table or Alarm Banner elements, in the Alarm configurationFilter variable, from and Filter variable, to property.

Moreover, you configure an input field for the integer variable that enables (value: 1) or disables (value: 0) the filtering. This variable has to be specified in the configuration of the Alarm Table or Alarm Banner elements, in the Alarm configurationFilter type property.

Deleting the Alarm History

You can insert an input element in the visualization which the user can use to delete the previously recorded alarm history at runtime. The history displayed until then is removed and the display starts over.

  1. In the application (example: in the program PLC_PRG), implement the following code:

    itfAlarmConfiguration : AlarmManager.IAlarmConfiguration;
    itfAlarmConfiguration7 : AlarmManager.IAlarmConfiguration7;
    xKeepActiveAlarms : BOOL := TRUE;
    xClearHistory: BOOL;
    IF xClearHistory THEN
        FOR i := 0 TO AlarmGlobals.g_AlarmHandler.AlarmConfigurationCount - 1 DO
            itfAlarmConfiguration := AlarmGlobals.g_AlarmHandler.GetAlarmConfiguration(i);
            IF __QUERYINTERFACE(itfAlarmConfiguration, itfAlarmConfiguration7) THEN
                itfAlarmConfiguration7.ClearHistory(xKeepActiveAlarms := xKeepActiveAlarms);
            END_IF
        END_FOR
    END_IF                            

    When xClearHistory gets the value TRUE, the current history will be deleted.

    Recommendation:

    xKeepActiveAlarms should be set to TRUE so that active alarms are excluded from the delete operation. Otherwise, further recording will not be interrupted, but the log outputs may change with other status transitions.

  2. In the alarm visualization, add a button for deleting the history. Configure its Toggle property with the variable PLC_PRG.xClearHistory.