While loop bug? Stuck on empty

Just to clarify - the purpose of the while loop is to wait for the nextMove command to be set true again based on external input from the plotter.

Thanks