Ok, So I ahve a formula something like this 100/a*B When the machine is not running (a) is 0 so it gives me stars on the panelview. How can I get this to go to 0?
More info. What is "a" an integer? floating point number? Where is this formula? In the PLC or your PV. What value does the *** on the PV represent?("a" or the results of the formula)
You can put a conditional statement before executing the formula. Use an if A is greater than instruction (GRT in AB speak) before the formula is ran. Also, you can fault out some processors doing a divide by zero.
Bruce is right on; it's good programming practice on any platform to boundary-limit division instructions like that. You probably want a zero when the machine is not running, so make your logic "if a> 0 then x=100/a*b, if a<= 0, then x=0".
If this is a numeric display in a PanelView Plus terminal, you can make the display connection an Expression to prevent the "*****" onboard, like this: