I have an analysis that filters out 'bad' data to prevent calculation errors.
Simply, it is: If BadVal('Attribute') then "Bad" else 'Attribute'
Further on, if the result of the prior test is "Bad" then there is no output.
The attribute is a 'Single'.
The analysis is set to periodic, 1 minute.
Seems simple enough... except when I look at the archive values; the archive has numeric values, but for the time period in question, they are largely marked as 'Questionable'.
If I preview the calculation, it seems the 'Questionable' flag makes BadVal mark the value as bad.
However, if I use PI-SMT and look at the archive data and filter it with "not badval('TagName')" then all of the values are shown, including the 'Questionable' values.
So... when is BadVal actually bad, ie: a digital state when a numeric value is expected?
It would appear I can use 'IsSet' to see if the value is questionable, but if the value is questionable, can it still truly be bad in the sense relayed in the previous question?
I CAN change the analysis to perform the equation regardless of values and then check for a 'Calc Failed', but that just seem... wrong on so many levels.