Macros for 3D probing

Thanks very much for the analysis and suggestions. Iā€™ve got a busy day of meetings (central time, USA) but Iā€™ll try to get to this later today.

This augmented image might help. Perhaps we arenā€™t seeing the same mental image:

OK - bottom left for the machine, I had interpreted your earlier description as top left.

1 Like

Either way, the new macro code should be more robust, even if the sign of the adjustment variables needs reversing as you did before.

1 Like

Iā€™ll have to grab the data, but wanted to quickly report that the recent XYZ probing macro worked perfectly!

[Edited to attach macro (no changes from what you provided) and output.]

Probe_XYZ_output-3Sep2024.txt (2.6 KB)
Probe_XYZ_Macro-3Sep2024.txt (3.7 KB)

1 Like

Happy days!! Glad itā€™s workingā€¦ this new macro is altogether a better bit of ā€˜codeā€™ than the original

1 Like

Have you figured out tool changes? Ideally I can start by setting tool length with the 3D Touch probe, and then move on to other tools from there. I plan to try the built-in fixed tool length setter, but wasnā€™t sure if there were better macros to use instead.

Iā€™ve given this some thought, but not yet written anything. The process must be something like;

  • go to a known, repeatable location that is not a workpiece and will never move
  • probe Z here with whatever tool is in the spindle to establish a baseline
  • go to your workpiece and probe Z as you normally would, do some work
  • change the tool when prompted by gSender
  • go back to the repeatable location and probe Z as a ā€˜delta to baselineā€™ action
  • compute the delta and store this in Grblā€™s tool length offset memory
  • do some work without needing to re-probe Z

I need to read up on this to get a really clear understanding of the proper action sequence, and Grbl commands to commit these things into offsets memory, before the task of writing a macro.
It is conceivable that the 3D probe could be used as the ā€˜first toolā€™ in the process, the actual cutter tools being delta compared to this for offset compensation.
As a workflow this might make sense, as probing X0Y0 has the probe in place, whilst still in the machine, go to the reference location and probe Z. Then change the probe out for a cutter tool and measure that for offsetting.

There does seem to be a fair bit of information out there on tool changing. This is a fairly recent post. New to Tool Change, What's Missing?

Many notes tie back to @NeilFerreri macros ā€“ CNCjs-Macros/Initial & New Tool at master Ā· cncjs/CNCjs-Macros Ā· GitHub

And while I agree with the adage of ā€œif it ainā€™t broke, donā€™t fix itā€ I do wonder if in the intervening 5 years and with the introduction of grblHAL if there are any desired modifications out there.