Thanks for your response, sorry for the confusion. The “B†programs are intended to be a State Machine. Flowstate is a state variable. Int_1, an integer variable, and is intended as a flag to indicate that the timer has timed out and there is a real flow event, not a nuisance trip (a sustained 5 second signal not a momentary one) and therefore want to transition to state 2.