New user warning... Mach4 and ESS on PMDX-126
I am trying to get the machine to drive home to its limit switches, slowly, then slowly back off 2 inches X and Y and then zero the DRO. Most of that works, but while I thought I had it with the script mods below, I am seeing that the amount of movement away from zero is increasing each time I run it.
Perhaps I am chasing this the wrong way, like I said, I'm new at this.
---------------------------------------------------------------
-- Ref All Home() function.
---------------------------------------------------------------
function RefAllHome()
mc.mcAxisDerefAll(inst) --Just to turn off all ref leds
mc.mcAxisHomeAll(inst) -- Bring to limit switch
coroutine.yield()
mc.mcCntlMdiExecute(inst, "G00 F25 X2 Y2") -- move away from the corner -mac
coroutine.yield() --again
mc.mcCntlMdiExecute(inst, "G92 X0 Y0")-- Reset Y and Z to Zero -mac
coroutine.yield() --again
wx.wxMessageBox('Referencing is complete - Moved into position')
end