Probing in Mach 4 - "Probing Failure Disables Mach" setting

I decided to start a new thread for this specific question because the other probe thread was getting a little confusing.

I recently configured a Vers Wireless Touch Probe. Everything about it works great but I would like to utilize the integrated Mach 4 probing routines. According to this ESS/Warp 9 documentation, Probing in Mach 4, I’ll need to disable the “Probing Failure Disables Mach” feature. If I manually change this setting, everything works as expected.

I’m having trouble with a button/script to change this setting. Below is the script I’m trying to use:

local hregProbingFailureDisablesMach = mc.mcRegGetHandle(inst, string.format("ESS/Probing_Failure_Disables_Mach")) 
mc.mcRegSetValue(hregProbingFailureDisablesMach , 0 )

The script doesn’t give me any errors but it doesn’t appear to change the setting.
__
I also wanted to try the m2010 macro listed in the Warp 9 page but I don’t see this in any of my macro folders. Does anyone else have this macro that you could share?

This is what is on the Warp9 page:

– This will pass spindle and general SmoothStepper parameters in through the (comment)
function m2010()
local inst = mc.mcGetInstance('Script m2010 ') – Pass in the script number, so we can see the commands called by this script in the log

--Get the existing GCode comment lines if any
local hHcCommand = mc.mcRegGetHandle(inst, string.format("ESS/General_Command_M2010"))  

local CurrentStr = mc.mcRegGetValueString(hHcCommand)
--Get the current line number, and read in the line
local LineNumber = mc.mcCntlGetGcodeLineNbr(inst)
local LineNumberStr = mc.mcCntlGetGcodeLine(inst, LineNumber)

--mc.mcCntlLog(inst, LineNumberStr, "", -1) -- This will send a message to the log window

i = string.find(LineNumberStr, "%)" )
if i == nil then
    mc.mcCntlLog(inst, '~~~~m2010() Could NOT find ")"', "", -1) 
else
    LineNumberStr = LineNumberStr:sub(1, i)    -- This will remove the end of the string after the closing ')'
end


i = string.find(LineNumberStr, "%(" )
if i == nil then
    mc.mcCntlLog(inst, '~~~~m2010() Could NOT find "("', "", -1) 
else
    LineNumberStr = LineNumberStr:sub(i)    -- This will remove the beginning of the string before the comment starts '('
end
CurrentStr = string.format("%s %s",CurrentStr, LineNumberStr) 


--Paste the GCode Line comment into the Laser_Raster_Command register (for processing)
mc.mcRegSetValueString(hHcCommand, CurrentStr)   -- This will populate the GCode line data into the register


mc.mcCntlLog(inst, '~~~~m2010() Loaded spindle and general SmoothStepper Parameter from Comment', "", -1) -- This will send a message to the log window
mc.mcCntlLog(inst, LineNumberStr, "", -1) -- This will send a message to the log window
--mc.mcCntlLog(inst, "", "", -1) -- This will send a BLANK LINE to the log window

end

if(mc.mcInEditor() == 1) then
– If you are in the mcLua editor, this will cause your script to execute if you Run or Debug
– Make sure your Capitalization and numbers match that of the function you are calling
m2010()
end

Thanks Jim. Can you link where you found this on their website? I couldn’t find it earlier.

Edit: Nevermind, I found it in their FAQ. I’m going to try adding this to my macros folder and run the m2010 (PROBE_FAILURE_DISABLES_MACH=0) to see if it works.

Sure.

Go here: FAQ Mach4

Then go to this section. The macro names are all links.

1 Like