Hello,

I am trying to write a performance equation that will look at each tag I am using for a calculation and determine if they are within a certain range, if they then I want to do the calculation and report the number. If one of the tags is outside the range I want it to output a text string stating that tag is bad.

Here is what I have **'IF 'FIC-311.PVI' < -0.02 or 'FIC-311.PVI' >75 Then Text("FIC-311.PVI is BAD") Else If 'TIC-448.PVI'<-0.2 or 'TIC-448.PVI' >700 Then Text( "TIC-448.PVI is BAD") Else If 'TI-313.PVI' <-0.2 or 'TI-313.PVI' > 735 Then Text("TI-313.PVI is BAD") Else If 'FIC-302.PVI' <-0.2 or 'FIC-302.PVI' > 19000 Then Text("FIC-302.PVI is Bad") Else If 'TI-334.PVI' <-0.2 or 'TI-334.PVI' > 700 Then Text("TI-334.PVI is BAD") Else If 'TI-330.PVI' <-0.2 or 'TI-330.PVI' > 650 Then Text("TI-330.PVI is BAD") ELSE(('FIC-311.PVI'*1000)*(172+(('TIC-448.PVI'*0.4363)-(0.5332*'TI-313.PVI')))/1000000)+(('FIC-302.PVI'*(172+(0.4363*'TI-334.PVI')-('TI-330.PVI'*0.5332)))/1000000)**

I know for a fact that one of the tags is bad in this equation but the only output I get for this is [-11059] No Good Data For Calculation. I have tried the string function also and it didn't work.

Thank you for looking.

Dan

Hi Dan,

If one of the input PI Points contains a digital state (such as a BAD), you will need to account for that using the BadVal() function. For example if BadVal('Tag') then "Tag is Bad" else ....

Hope this helps,

Seb