Don't see a for loop. I see a while loop in your original code then Smurph gave you an expamle to do the moves with an 'if' conditional statement based on mach's operating state before making the second move. All done in the PLC. If/then statements work. I'd avoid while/repeat loops like the plague inside the plc or button script because of the constant refresh. try the mc.CntrlMdiExecute function. My DROs always update with movement and the screen doesn't freeze. Now, mc.CntlGcodeExecuteWait on the other hand is different. That functions locks everything out (except motion controller/core request/reporting) and gives sole ownership of Mach 4 to that Gcode block until it is complete and nothing updates until done. I know you have mc.CntlGcodeExecute written. I sware my DROs move with that function too...I'll have to check.
--josh