How would I script a pi calc or performance equation that returns a true value if a temperature tag PV has not changed more than x% in the last ten minutes?
Can you provide a little more context for your request?
Are you looking to always compare the current event to the previous event 10 minutes ago and see if the percent change is over a threshold? Or are you looking to see if a tag's value has changed in the last 10 minutes?
This problem is rather tricky because it depends on the nature of your data. Is your data coming to your tag with no compression or exception settings?
If you are looking for PE or AF analysis then request you to use SecSinceChange('att1')
Equation : SecSinceChange('TemperatureAttribute')>600
Reference : PI Server
Let's assume the temperature gauge is in degrees C and the range is 0 to 100 - a simple example.
If you take the range for the last 10 minutes, range('tag'/'attribute', '*', '*-10m'), that will give you the difference between the lowest and highest values.
For our simple example, if that value is less than the predetermined 'x' percent, your value should be true.
For a 'real life' instance, the upper and lower range need to be known and the 'x' percent.Determine the range as a percentage of upper - lower value and compare that to 'x'.
Retrieving data ...