if you are comparing two tags having similar timestamps then
if ( (’Tag1’) <>(‘Tag2’)) then Timestamp(‘Tag1’) else NoOutput()
I have tried that but the time change everytime.
And I actually want the first time that Tag1<>Tag2.
I would suggest intermediate attribute to hold history and use below function. You may need to pass start and end time
e.g calculate difference between two tags and store in an attribute(tempattributename) based on your logic
FindEq(tempattributename, starttime, endtime, 0)
2 of 2 people found this helpful
If you just need the time, evaluate Tag1<>Tag2. If true, write the timestamp to a PI Point in your analysis..
Other solution i can think of is a two-step approach:
- Evaluate the expression, and save the output to a PI Point. This will be e.g. the true/false output of a natural-scheduled analysis Tag1<>Tag2
- Then use FindEq to find the last time this was True: https://livelibrary.osisoft.com/LiveLibrary/content/en/server-v11/GUID-D9CA39DC-818B-433B-9BE4-497493E0095F