Alarm Journal - Filter on Associated Data

An alarm journal profile, alarm, and associated data must configured

This section assumes that an Alarm Journal Profile, alarms, and associated data be configured. To learn more, go to the Configuring Alarms, Alarm Associated Data, and Journal Properties and Tables pages.

Just like the Alarm Status Table you can filter the Alarm Journal Table based on associated data that you added to your alarms.

How to setup the Alarm Journal to Filter on Associated Data

Once associated data is added to an alarm, you can easily filter for specific alarms in the Alarm Journal Table component. Typically, the Alarm Journal Table shows you the complete history of all alarms within a specific time period using the Date Range component.

images/download/attachments/6034766/Alarm_Journal_Filter_on_AssData_-_All_History_1.png

In this example, a 'WriteableFloat1' Tag was used and added to an alarm. You can see that two alarms were configured for 'WriteableFloat1,' but only one has associated data. Associated data was added to the High Alarm called ‘Group’ and was given a static value of ‘Group A.’ You can filter on what is shown in the alarm list based on the associated data. You can search for all the Group A’s or whatever associated data that was added to your alarm.

images/download/attachments/6034766/Alarm_Journal_Filter_on_AssData_-_High_Alarm_Associated_Data_2.png

Once your associated data is configured in your alarm, the next thing you need to do is setup your script to filter for all the alarms in your history that have the associated data named 'Group' with a value of ‘Group A’. Instead of using the properties in the Property Editor, go to the Scripting area and use an Extension Function.

  • Right click on your Alarm Journal Table component and select Scripting. The Component Scripting window will appear.

  • Under the Extension Functions folder, click 'filterAlarm.'

  • Check Enabled and enter the following code at the bottom of the 'filterAlarm' script.

'filterAlarm' on associated data
group = alarmEvent.get("Group")
if group == "Group A":
return True
return False

What the ‘filterAlarm’ script is doing, is for every alarm matching ‘Group A,’ it will return ‘True,’ and show the alarm in the table. If the associated data does not match ‘Group A’, it will return ‘False,’ and the alarm will not show up in the table.

Scripting allows you to use the 'filterAlarm' function for associated data. This script is only going to show you the alarms matching the associated data. You can add other filters as well depending on your requirements.

This example shows the updated ‘filterAlarm’ script. Press OK.

images/download/attachments/6034766/Alarm_Journal_Filter_on_AssData_-_Scripting_Filter_Alarm_3.png

By default, the script is not going to automatically use your new filter until the data is updated. This happens automatically when a window is opened, but to trigger the associated data filter immediately, change the Start Date or End Date. The easiest way to change the start and end dates is by moving the Date Range slider if you have one already bound, as shown in the example below.

Click Preview Mode, and move the Date Range slider to initiate the associated data filter.

images/download/attachments/6034766/Alarm_Journal_Filter_on_AssData_-_Enable_Associated_Data_Filter_4.png

Now, the Alarm Journal Table will show only alarms for 'Group A.' So it is very easy to filter on associated data. The associated data is outside the folder structure and outside the Display Path. It allows you to filter any way you want so you can look at alarms in a particular area of the plant or for a certain set of alarms.

images/download/attachments/6034766/Alarm_Journal_Filter_on_AssData_-_Group_A_Filtered_5.png

Similar Topics ...