Can an expression analysis be triggered 60minutes after a change in a PI point value by triggering the analysis on an AF Attribute with a relative time PI Point Data Reference?
First off, I want to correct what I wrote earlier and show that this should work with event triggered if you use a future tag! You could write to a future tag and use event triggering to determine when that value is current. I recalled that the analysis service uses a DataPipe for the future data such that is is picked up when it becomes current allowing this to work!! This will allow event triggering and you could do this with an event trigger eliminating the need for polling. At times, I prefer polling (periodic) as it simplifies the problem and could remove a dependency. Good question.
I would need more details but you could write to a future tag and check periodically the future tag. If an event is picked up in the scan (use a PE to determine how many events exist) then you can perform your logic.
What I am looking for is if there is a method to detect if atag has been in a given value for longer than 60 minutes without the load of aperiodic job as the source value is not very volatile. I think event frames maybe more than what is need.
If I can trigger an expression analysis 60 minutes after the source value has changed I can then test how longthat tag has been in that value. Pseudo code may look something like:
Trigger on change + 60 minutes
If value = “comms down”
if timeEqual “comms down” >= 3600
set output to sustained commsdown.
Awesome, will do.
The functions SecSinceChange or HasChanged can be used to detect if a tag value has changed. Could this be useful to you?
You can also read more about triggering on future data here.
Retrieving data ...