Create event frames automatically to track inefficiency
- Last UpdatedJan 10, 2025
- 3 minute read
- PI System
- PI Server 2018
- PI Server
We created a sample analysis to track how the efficiency of a process deviates from the target efficiency in Build an expression analysis to study efficiency deviation. In this example, we create event frames to capture data any time the 15-minute running-average efficiency drops below 90%.
Prerequisite: Complete the steps in Build an expression analysis to study efficiency deviation.
-
In the Library browser, expand Templates.
-
Right-click Event Frame Templates and then click New Template to create a new event frame template.
-
In the Name field, enter EfficiencyAnomaly.
-
In the Naming Pattern field, specify the name of the event frames produced from the template.
You can use substitution parameters to specify a varying name. PI AF resolves the parameters when creating the event frames. Then, each event frame will have a unique, identifiable name.
-
Click the arrow next to the field to see valid substitution parameters that you can add to the name.
-
Select %ELEMENT%.
-
Select %STARTTIME:yyyy-MM-dd HH:mm:ss.fff%.
The STARTTIME substitution parameter includes the date-time formatting pattern to use.
-
-
Click the Attribute Templates tab.
-
Create a new PI point data reference attribute using an attribute template.
-
Click New Attribute Template.
-
In the Name field, enter Efficiency.
-
Click Settings and enter the following configuration string in the Tag name field:
.\Elements[.]|Efficiency; uom=%
-
From the Default UOM list, select percent.
-
-
In the Elements pane, click Ethylene, the element for which you built an analysis in Build an expression analysis to study efficiency deviation.
-
Click the Analyses tab.
-
Click New Analysis
.
-
Name
Enter EfficiencyAnomalyEvent.
-
Analysis Type
Click Event Frame Generation.
-
-
From the Event Frame Template list, select EfficiencyAnomaly.
This is the event frame template you created in the earlier steps.
-
Enter expressions that specify the start and end of the event frame:
-
StartTrigger1
TagAvg('Efficiency', '*-15m', '*') <90
Creates an event frame whenever the 15-minute average efficiency drops below 90%.
-
EndTrigger
TagAvg('Efficiency', '*-15m', '*') >92
Ends the event frame whenever the 15-minute average efficiency has recovered and exceeds 92%.
-
-
Click Evaluate to check the current values of the expressions.
The Value column is populated with either True or False for each condition.
-
For the Scheduling option, click Periodic.
-
Click Configure and set the analysis to run every minute.
-
-
Specify scheduling for the analysis.
-
For the Scheduling option, click Periodic.
-
Click Configure and set the analysis to run every minute.
-
-
Check in your work.