The the conditional logic is so complex in your code that I can not really follow. I ageee with @LarryD suggestion of using a state machine with switch case contolling the process as the bsst way forward.
1 Like