Hello Guest it is June 14, 2026, 02:45:51 PM

Author Topic: MachPro Probing Wizard  (Read 392 times)

0 Members and 1 Guest are viewing this topic.

MachPro Probing Wizard
« on: May 15, 2026, 09:01:17 PM »
I have a woodworking machine using a metal XYZ plate for touchoff's. its 0.202in tall, so when I probe I need to have the height set to 0.202 + retract height in order to get to Z0. The MachPro Probing Wizard, has removed this functionality from the mcTouchOff.lua from Mach4. As well the BLUM routines are fricking overkill for what most woodworks will use. I do not want to load up my 3d probe just to do a 0.001" accurate touchoff on material that is not even close to being that flat. As well, it's wood. in other words it's non-conductive and using the tool to touchoff is not happening unless you have metal attached to a pin on the BOB.  I have a second wireless probe which has a height of 1.787", is it'd be nice if the probe input allowed you to specify a height, even if it's 0.

So, it's possible to run mcTouchOff.lua instead of the wizard. you can add it in several ways, including adding it directly to the screenset as a button on the Tools page, Find attached a .setc that does this. Just make sure your in the right place in the screen editor, import the setc and change the top to 229 and left to 7 to align it.

https://youtu.be/oqXG43C4x9c  here's a lousy video of what happens when using the MachPro Probing Wizard.

Re: MachPro Probing Wizard
« Reply #1 on: May 24, 2026, 11:35:07 AM »
Thanks to Claude, here is a modified mcTouchOff.lua files which a Z height for each probe. I have 3 that I use. 3d probe (has to be G31 as BLUM only works on G31), XYZ touch plate with centering hole. And a wireless setter.

Use at your own risk but it seems to work as advertised.
Re: MachPro Probing Wizard
« Reply #2 on: May 24, 2026, 04:26:08 PM »
better version based off the original.
Re: MachPro Probing Wizard
« Reply #3 on: June 14, 2026, 11:01:23 AM »
Within a UserGUIModule.mcs file, near the bottom you will find a section called UserGUIModule.CreateUserCommands(). You can add the following to into this function. This will create a User command which can then be added to a function button on widget panel. The mcTouchOff.lua module can then be called directly from a button on screen. The version in this thread has heights for EACH probe allowing the use of multiple types of Z probes. For example, a simple XYZ plate, a XHC wireless probe or a 3d touch probe. All of these would need to be wired to a separate probe input. There are four G31, G31.1, G31.2, G31.3


function UserGUIModule.mcTouchOff()
   if (Tframe == nil) then
      -- TouchOff module
      package.loaded.mcTouchOff = nil
      mcTouchOff = require "mcTouchOff"
      Tframe = mcTouchOff.Dialog()
   else
      Tframe:Show()
      Tframe:Raise()
   end
end

function UserGUIModule.CreateUserCommands()   
   -----------------------------------------------------------------------------------
   --- Open Touch Off Dialog
   -----------------------------------------------------------------------------------
   w.CreateCommandActionOption("mcTouchOff", function(from_opr_panel) UserGUIModule.mcTouchOff() end)
   w.CreateSimpleCommand("mcTouchOff")
   
   return true, true, w.FunctionCompleted()
end

then you right click on a button, configure widget and select mcTouchOff from the dropdown. Now when you press the button, it will popup the mcTouchOff wizard and you can run any of the routines. In particular, I needed the two probes with differant heights. The MachPro supplied wizard, does not take into account the height of the probe when doing a Z height probe

Thanks to Paul Stephen for the insight and help with this and Claude AI for the modifications to the original code from Mach4.  I do know of one bug in the code but it's not a game changer. When you initially set a height for a probe, the display does not reflect the new height. Only after selecting a new probe and then going back will it display the new height.
Re: MachPro Probing Wizard
« Reply #4 on: June 14, 2026, 11:04:32 AM »
I should also mention, this change makes it permanently available unlike modifying the screenset which needs to be re-added every update.