I am trying to use AF Templates to create values in Event Frames. To do this I am pulling in a "tonnage/hr" value from my asset and applying that to a calculation in a formula.

The problem is if I don't have a "tonnage/hr" PI value for the asset, then the formula breaks and produces an error

Is there any way I can set up my formula to ignore these error, or somehow account for them? I have tried using an IF statement to determine if it is >0<, but that didn't work.

I have 100s of assets so don't want to create templates for each.

Thanks in advance for any assistance.

Kevin

Hi Kevin,

You could try to catch the bad values using the BadVal function, and change the value of the variable in that case to prevent the badval causing issues in later lines in your formula.

This is quite limited and cumbersome for calculations with many variables.

E.g.:

Variable A = some attribute.

Formulas:

If Badval(A) then A=-1 Else A=A

<now use the value of A here in the next line of the formula safely>