AnsweredAssumed Answered

Excluding 'Bad Input' with in Processbook PI Calculation

Question asked by Mahalet-M on Mar 10, 2017

I have tags that report 'Bad Input' every so often (due to old equipment) and I would like to exclude these 'Bad Input' Values from Processbook to do multistate and to only use 0 or 1 (the good values).  I  tried the below two expressions within Proceccbook PI Calculation but neither seem to exclude the 'Bad Input' values. Is there a different expression that I need to try? 

 

Raw data for the tag looks like the below.  The 'Bad Input' value also shows within PI Datalink when doing a compressed data report.

Processbook PI Calculation Expressions:

If
BadVal('L01_B400_MowattLaneSubstation_CITECT_MOW1_103_52a') then
PrevVal('L01_B400_MowattLaneSubstation_CITECT_MOW1_103_52a') else
'L01_B400_MowattLaneSubstation_CITECT_MOW1_103_52a'

 

If
TagVal('L01_B400_MowattLaneSubstation_CITECT_MOW1_103_52a') = "Bad
Input" then
PrevVal('L01_B400_MowattLaneSubstation_CITECT_MOW1_103_52a','*') else
TagVal('L01_B400_MowattLaneSubstation_CITECT_MOW1_103_52a')

 

 

Thank you,

Mahi

Outcomes