AnsweredAssumed Answered

Can I set a calculated point attribute to a numerical value when good and text when bad?

Question asked by abekearl on Oct 23, 2018
Latest reply on Oct 24, 2018 by LalBabuShaik

I am creating some PI tags in AF. One of the tags I am generating, I only want to record values when a bunch of start triggers are true.  I am using logic like this.

 

 

'Gross Generation' > 15 and HasChanged('Gross Generation','*-15m') and Range('Gross Generation','*-15m','*')> 0 and Range('Gross Generation','*-15m','*')< 8 and 'Overall Status Average' = 1 then 'Rollup_Total_Feeder_Calc_Flow' Else 0

 

 

The problem comes when it switches between True and false.  If my timestamp is between two recorded times, PI will interpolate between the 0 and the actual value for that moment.  That creates a large error because the 'Rollup_Total_Feeder_Calc_Flow' Is not actually jumping from 0 to a value it is usually staying pretty steady.  I would prefer that those transition times just keep showing zero, or preferably just says "bad" or something.  Something like this:

 

 

'Gross Generation' > 15 and HasChanged('Gross Generation','*-15m') and Range('Gross Generation','*-15m','*')> 0 and Range('Gross Generation','*-15m','*')< 8 and 'Overall Status Average' = 1 then 'Rollup_Total_Feeder_Calc_Flow' Else "Bad"

 

 

I had it this way once, but then it would not give me the value when the expression evaluated true. It was almost like having the "Bad" converted it to a digital tag or something. 

 

Is there a better way to go about this?

 

Thanks

Abe

Outcomes