We have bad input and good value at exact same timestamp. I was wondering if there is a way to use a good value in pi AF analyses?
Please find the expression for your case.
Thank you for your response. But, our version of AF doesn't have recordedvalues function.
Where is the Bad Input coming from? Could it be fixed at the source?
It is coming from ABB WIS system. They tried to fix it, but no luck.
Assuming the analysis is event triggered on tag with 'Bad Input', get the TagMax for that time.Again, if event triggered, then the event time is 'now', so: TagMax('Attribute','*','*+1m').That should get the numeric value for the tag.Or, alternately, if the analysis is event triggered on the tag that is getting 'Bad Input' and the event triggers for each input, can you check the attribute value and, if is it not bad, write it out to another tag? A simple filter, but I don't know if the analysis will get both values during trigger.
Seb: can you answer the double-trigger question?
Analysis only runs once for a specific triggering time. First value in at time t will trigger the analysis and the second value at time t will be added to the data cache but will not trigger the analysis. So if Bad Input is the first value coming in, there's no way to trigger on the second numeric value. Workarounds like Lal suggested can be used, or alternatively and better the data source / interface should be fixed to avoid the duplicate values.
Retrieving data ...