Hello
The thing you need is a Select statement ( in comparison palette) This will send the Clockwise stuff OR the ACW down the wires to your digital writes. Make sure that the boolean is read each cycle, think about where to put it.
Very important! Put a delay in the free running while loops, this will use up all the computing power of the machine and in the case of the zero case loop not achieve very much. Good luck
Yours Sincerely
John Brohan www.tradersmicro.com