I've come across an intermittent issue and I've confused myself over how the code should operate.
What should happen is (Counter = 1 OR Counter <1) AND NOT Auto but what I think might be happening is Counter = 1 OR (Counter < 1 AND NOT Auto).
So essentially if it's in Auto it will only use the Initial setpoint value regardless of the counter? Can anyone clarify?
What should happen is (Counter = 1 OR Counter <1) AND NOT Auto but what I think might be happening is Counter = 1 OR (Counter < 1 AND NOT Auto).
So essentially if it's in Auto it will only use the Initial setpoint value regardless of the counter? Can anyone clarify?
Code:
IF Counter == 1
OR Counter << 1
AND NOT Auto
THEN
SETPOINT := NewCalc
ELSE
SETPOINT := Initial
ENDIF;