SOtto

PI Count Issues

Discussion created by SOtto on Jul 22, 2020
Latest reply on Jul 31, 2020 by SOtto

I Can't get the following PI Expression to count correctly.

 

If PrevVal('3ZN1:B52.CIN','*') = "Normal"  and TagVal('3ZN1:B52.CIN','*')= "Firing" then 'U3_SHOCK_FIRING_COUNT'+1 else 'U3_SHOCK_FIRING_COUNT'

 

When assigning it as a Float32 tag it double counts. When assigning it as an Int32 it does not count all the time.

 

I thought there may be some issue with the large span but changing this did not impact the count.

 

The double count looks like it is caused when we are not reading the  'U3_SHOCK_FIRING_COUNT' tag and it is interpolating a value and then when it counts it increments the count by 2 instead of one when the tag   'U3_SHOCK_FIRING_COUNT'  is a FLOAT32 type point

 

Tag NameDescriptionUnitsZeroSpanRevised SpanPI ExpressionRevised PI ExpressionPoint TypeRevised Point TypeLocation 4Exc DEV EngExc Dev %Comp Dev EngComp Dev %CompressingCurrent ValueComments
3ZN1:B52.CINZONE 1 COMBUSTOR FIRING 861   Digital 1    ONNormal 
U3_SHOCK_FIRING_COUNTU3 Shock System Firing Shot CountSHOTS0500000500000Event=3SOOTOPT:1B.BO04, If PrevVal('3ZN1:B52.CIN','*') = "Normal" and TagVal('3ZN1:B52.CIN','*')= "Firing" then 'U3_SHOCK_FIRING_COUNT'+1 else 'U3_SHOCK_FIRING_COUNT'If PrevVal('3ZN1:B52.CIN','*') = "Normal" and TagVal('3ZN1:B52.CIN','*')= "Firing" then 'U3_SHOCK_FIRING_COUNT'+1 else 'U3_SHOCK_FIRING_COUNT'Int32Float3212.500000240.000505.000000480.00100ON589Double Counts or misses counts. The problem appears to be interpolation of the raw data when the combustor is not firing and we are not calculating values for the tag . Lets try looking at the event more.

Outcomes