Displaying Alarm Events for a Specific Time Range
Note
Sample project: Filtering Alarms by Latch and Time Variables
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.
The time range when faults have occurred and have been recorded as alarms is often known. In this case, it can be useful to display only the alarms which have been recorded during this period. As a result, the important information is displayed in an optimized way and can be found more quickly.
In the alarm visualization, configure two input options for variables, which are located in the configuration of the Alarm Table or Alarm Banner elements, in the Alarm configuration – Filter variable, from and Filter variable, to property.
Configuration of alarm definitions for filters
In the application code, declare a string variable (
GVL
) for the time range.dtFrom : DT := DT#2020-01-01-02:00:00;
dtTo : DT := DT#2020-01-01-02:00:00;
eFiltTimeRange : VisuElemsAlarm.EFilterTimeRangeType;
The variables for the period when alarms occur are declared.
Program the alarm visualization for the Rectangle, Button, and Alarm Table visualization elements with an input configuration for the filter type as follows:
Add a Date/Time Picker element for specifying the beginning of the time range.
The Date/Time Picker element with the Variable element property is set to
GVL-dtFrom
.Add a Date/Time Picker element for specifying the end of the time range.
The Date/Time Picker element with the Variable element property is set to
GVL.dtFrom
.The Date/Time Picker element with the Variable element property is set to
GVL.dtTo
.Configure the alarm table. In the visualization editor, select the element and configure its properties as follows:
The Alarm configuration property → Filter by time range → Filter variable, from is set to
GVL.dtFrom
.The Alarm configuration property → Filter by time range → Filter variable, to is set to
GVL.dtTo
.The Alarm configuration property → Filter by time range → Filter type is set to
GVL.eFiltTimeRange
.The filtering is configured.