Is it possible to retrieve the timestamp of an AF attribute for the last time it read a specific value and show it in PI Vision? Example: Show on Vision display the last time a motor was stopped.
Not in PI Vision to my knowledge, unless you have an event frame that is triggered from the value you are looking for.
You could configure an AF Analysis to do this. The function would be FindEq().
Hope this helps,
FindEq finds the first time in a time range that a value matches the search criteria. Are there any functions that find the last time a value matches the search?
I think creating a periodic scheduled analysis with below logic and time period = scan class of the tag will give you the last matching event timestamp :
IF FindEq('Attribute','*-1m','*',"Stopped") = "NO RESULT" Then NoOutput() Else If PrevVal('Attribute','*') = "Stopped" Then PrevEvent('Attribute','*') Else NoOutput()
Thanks. TimeEQ let met reverse the start and end times: TimeEQ(attribute,'*','*-1h', "Stopped") This seems to allow the function to pull the most recent matching value rather than the first.
Retrieving data ...