Nice! I'm impressed...I couldn't get a while or a repeat loop (even with a break) to work for me, just kept freezing the GUI as button scripts are 'ran as events'. I just figured I'd start using wx.wxMessageBox to break up the chunks. I finally got all kinds of movement in on a button script now by breaking it up with the message box (all kinds of mc.mcCntlMdiExecute and mc.mcJogVelocityStart functions going on without racing) for multiple phases in the auto tool button without G31. I was using the message box to prompt the user and when a movement phase was complete, the user just hit ok. This would signal Lua to execute the next chunk in the script. If you don't mind, I'd like to try the while loop with wx.wxMilliSleep combo. Nothing like automation! ...man, I love this stuff! Below is a what I mean, this is just a snippet. I agree with BR549, smart dude. The machine works for us (Period!)
--josh
gCode = "G0 G90 G54 G17 G40 G49 G80\n"
gCode = gCode .."G53 Z0.0\n"
gCode = gCode .."G53 X14.0 Y0.0\n"
gCode = gCode .."G53 X12.0 Y1.0\n"
mc.mcCntlMdiExecute(inst, gCode)
mc.mcSignalSetState (hSigOZero, 1)
wx.wxMessageBox ("Next: Probe table.")
mc.mcJogSetRate (inst, 2, 40)
mc.mcJogVelocityStart (inst, 2, -1)
mc.mcSignalSetState (hSigOZero, 1)
if inputZero ==1 then mc.mcJogVelocityStop (inst, 2)end
wx.wxMessageBox ("Next: Goto Tool Setter Position.")