Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: lesspaul on June 14, 2018, 03:10:32 PM

Title: Reset required after G31 probing moves?
Post by: lesspaul on June 14, 2018, 03:10:32 PM
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:

Code: [Select]
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.

Code: [Select]
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:

Code: [Select]
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)
Title: Re: Reset required after G31 probing moves?
Post by: rhill1002000 on November 18, 2021, 12:34:02 PM
Did you ever determine the root cause of this?  I'm running into the same issue and would like to not have to click reset between most every move.
Title: Re: Reset required after G31 probing moves?
Post by: gorf23 on November 18, 2021, 03:23:00 PM
I think you need to change the setting under the ess config spindle there is a check box to toggle this issue.

Gary
Title: Re: Reset required after G31 probing moves?
Post by: rhill1002000 on November 19, 2021, 06:51:36 AM
Thanks for your reply Gary but unfortunately I'm using a UC-100, Mach4 latest build and Windows 10.  An ESS is in my near future however.