Can an event based performance equation be set up to calculation after a set time from the change in the event tag?
For example, I'd like to calculate the PE 10 seconds after the change in value of the event tag.
FindEQ(): "Returns the timestamp closest to starttime within the specified interval when the attribute was equal to the specified value". A better approach is IMO
if timeeq('cdt158','*-10s','*',tagval('cdt158','*'))=10 then 1 else nooutput()
it will return 1 if the value was not changed for a time >=10s.
That's an interesting question. With respect to the delay, when would you like the timestamp of the calculation be? Would you like it when the event tag has a change of value or 10 seconds after?
How is the event tag receiving it's value? Is it getting data at regular 10 second intervals? Is there exception and compression settings for the event tag?
I am looking to have the calculation occur 10 seconds after the event tag updates.
The event tag is in a scan class of 3 secs.
The exception and compression settings are set to 0.1 and 0.2 respectively and the tag value changes by whole numbers.
Our PI server is still PI 2010, so do not have the event or asset analytics that I would like to have
I believe that I have come up with a solution though.
I created an additional tag that uses the FindEq function and checks that the new value has been present for > 10 (secs)
I am letting this configuration run over night to see if it gives me the result that I want.
Thanks for your support.
Thanks, I'll try this.
You can do this with Asset Analytics. I am not aware of an easy way to do this with PE's.
Open PSE -> Navigate to "Analyses" on the navigation pane -> right click the Pending Operations pane (right side of PSE) -> Edit Service Configuration -> CalculationWaitTimeInSeconds
That's a very good point. I believe this is a global configuration which means all analysis would be affected. This means that other calculations that might not want a delay would also be affected by the wait time.
Kevin, I really recommend you upgrade to the newest versions of the PI Server. There's a lot of neat stuff we've developed since PI Server 2010!
For those that may stumble across this post who DO have the PI Analysis Service, the Configuration pane for the PI Analysis Service controls global parameters. Changing CalculationWaitTimeInSeconds would cause all calculations to be delayed by that amount. By default, this value is set to 5 seconds to allow for any slightly late arriving input data. This prevents inadvertent Calc Failed and incorrect values. You can find more information about this parameter, and others for the PI Analysis Service, here: https://livelibrary.osisoft.com/LiveLibrary/content/en/server-v7/GUID-2B4D156F-8895-4DA0-BD60-78153BE2AE16
For those who may look aIf you only need to have a delay for one calculation, I suggest something similar to the following analysis:
IF Int('*' - PrevEvent('Attribute1', '*')) > 10 THEN [YourCalculationHere] ELSE NoOutput()
If Attribute1 updates frequently (every 5 seconds or so), you could make this event-triggered and get fairly precise results. You can also use the Advanced options to change the timestamp of the output to *-10s relative to trigger time.
Retrieving data ...