I am seeing something that seems unusual to this Mach4 newbie. I just got done writing my second script -- tool zero probing -- and found a strange behavior. Following a G31 probing move the MDI is disabled. Test code:
mc.mcCntlGcodeExecuteWait(0,"G91 G31 Z-2.0 F5.0)
however, if I press [Reset] or add mc.mcCntlReset(0) to the script all is well and the MDI works as expected.
mc.mcCntlGcodeExecuteWait(0,"G91 G31 Z-2.0 F5.0)
mc.mcCntlReset(0)
I am using the most recent release version of Mach4 (4.2.0.3804) and Ethernet Smoothstepper with firmware #220.
So my questions are: Is this normal? And if not, which is the most likely culprit, something I did, Mach4 or ESS?
For completeness sake, here is my entire tool zero script:
local inst = mc.mcGetInstance();
local TouchPlate = 0.622 -- Thickness of touchplate above material
local SlowProbeRate = 0.7 -- IPM
local FastProbeRate = 5.0 -- IPM
local JogRate = 60
local Pos
mc.mcCntlSetLastError(inst, "Probing for Z Zero . . .")
wx.wxMessageBox("Ensure touch plate properly positioned and connected, then press ENTER.")
mc.mcCntlGcodeExecuteWait(inst,"G91 G31 Z-2.0 F".. FastProbeRate) -- Probe TouchPlate at FastProbeRate
mc.mcCntlGcodeExecuteWait(inst,"G91 Z0.05 F".. JogRate) -- Retract
mc.mcCntlGcodeExecuteWait(inst,"G91 G31 Z-0.07 F".. SlowProbeRate) -- Probe TouchPlate at at SlowProbeRate
Pos = mc.mcAxisGetProbePos(inst, mc.Z_AXIS, 0) -- Get Touch Position (work coordinates)
mc.mcCntlGcodeExecuteWait(inst,"G90 Z".. Pos .. " F".. SlowProbeRate) -- Move back to touch point in case of overshoot
mc.mcAxisSetPos(inst, mc.Z_AXIS, TouchPlate) -- set DRO to height of touchplate
mc.mcCntlGcodeExecuteWait(inst,"G91 Z1.0 F".. JogRate) -- Retract
wx.wxMessageBox("Z Zero Set. Remove touch plate and press Enter")
mc.mcCntlSetLastError(inst, "Z Zero set")
mc.mcCntlReset(0)