Show me your probing macros

When I upgraded to the Universal G-Code Sender “Platform” (from the “Classic” version) some months ago, I ended-up with a problem where sometimes my Z-axis reverses. It is intermittent, and I’m typically able to get things setup and open a file and run w/o issue.

But sometimes when I run a program, the Z-axis goes the opposite direction, crashes at the top, and I often have to start over.

On occasion, the Z-axis will reverse during probing. That is about 1/10th the total instances, though. It did happen Saturday, though.

That led me to a post here where others were having the same issue, someone thought it might be due to the Z already being negative. Someone said to add G90;G21 at the beginning of the probing code (which I’ve now done). But of course, I cut my project and it worked, but it might have worked anyhow. Here is that other thread of which I speak:

WOW this is getting long, apologies.

The reason I’m still hung-up on the probing macro, though, is that when I moved from “Classic” to “Platform,” my probing macro was lost. I couldn’t retrieve it from the “Classic” version, some settings got overwritten or something.

So maybe the probing is the common denominator, I always probe to setup.

ANYWAY, here is my current macro:

G90;G21;G38.2 Z-25 F100;G90;G10 L20 P1 Z6.32;G0 Z10

My self-made touch probe is a aluminum block that is 6.32mm. I only probe for Z, never really for X/Y.

Care to share your macros here? Spot anything wrong in my macro?

Hope everyone else is doing well. Lots of activity here lately, which is super-fantastic.

1 Like

@cgallery You typically want to enable relative (G91) motion mode before a probe and restore absolute (G90) after. Absolute is the default mode when you start grbl. In your macro above, you are probing to work position Z-25, not probing down 25mm. In some cases your previous work zero will be well above your probe which may be a cause of the Z moving up TO that location. Don’t forget the G90 when you’re all done probing, though. That Z10 at the end of your macro will only move up 3.68mm because you’re in absolute mode.
Also, it seems to be good practice to add a dwell (G4) before and after the G10L20 as it takes time for the controller to store that info in eeprom. I usually use G4P0.25 for a quarter second pause before and after.

Okay thanks, I now have this:

G21;G91;G38.2 Z-25 F100;G90;G4P0.25;G10 L20 P1 Z6.32;G4P0.25;G0 Z10

Is the G90 in a logical spot? I’m not sure the best point to switch back to absolute, before or after setting the P1 Z to 6.32.

Any thoughts on that?

I’d move the G90 to the very end. That way your final retract move actually moves the distance to have there.

I’ve been using these for quite some time now, and they work well. I will state that probing works really…weird…if you get any noise on the probe line.

First, here’s some background on how this works

Set Probe Position (Make sure there is enough room here for any endmill you will use)
G92.1; G30.1 . -> Cancels temporary offset, then store current position.

Go To Probe, seek toward Z0 first, then through WCS XY zero, then to directly over probe and then down.
G90;G92.1;G53G0Z-5;G30 X0Y0; G30

Go to probe, and probe Thick
G90;G92.1;G53G0Z-5;G30 X0Y0; G30;g91;g21;g38.2z-100f300;g1z5f150;g38.2z-100f50;G92Z24.98;G0Z20;g90;G53G0Z-5

Go To Probe, and probe Thin
G90;G92.1;G53G0Z-5;G30 X0Y0; G30 ;g91;g21;g38.2z-100f300;g1z5f150;g38.2z-100f50;G92Z21.96;G0Z20;g90;G53G0Z-5

Probe Thick from current position -> Goes straight down from current position! (24.98mm thick Z probe)
g91;g21;g38.2z-100f300;g1z5f150;g38.2z-100f50;G92 Z24.98 ;G0Z20;g90;G53G0Z-5

Probe Thin from current position -> Goes straight down from current position! (21.95mm thick Z probe)
g91;g21;g38.2z-100f300;g1z5f150;g38.2z-100f50;G92 Z21.96 ;G0Z20;g90;G53G0Z-5

Example for custom probe thickness (a piece of 6.44mm aluminum on my desk)
g91;g21;g38.2z-100f300;g1z5f150;g38.2z-100f50;G92 Z6.44;G0Z20;g90;G53G0Z-5

In this macro set are the following:
Go XYZ Zero . -> Goes to the XYZ Zero for the current WCS (because UGS Return to Zero isn’t what I want)

Go XY zero + 24mm -> Goes to the XY Zero, and 24mm above it in Z, like CM does.

ReadyChange -> Brings carriage straight up, then almost all the way forward, like CM does. It DOES NOT change the spindle on/off state.

SetProbe -> Sets the position of the probe so you can go back to it easily.

GoProbe -> Goes back to the probe position you last stored.

Changetool-Thick -> Goes straight up from the current position to near top, goes through the current WCS zero (XY), and then over to the probe, straight down, and probes, assuming you’re using my carbide 3d probe, and the “thick part”.

Changetool-Thin -> Goes straight up from the current position to near top, goes through the current WCS zero (XY), and then over to the probe, straight down, and probes, assuming you’re using my carbide 3d probe, and the “thin part”.

Workflow would be something like:

  1. Install your tool
  2. Set your XY Zero
  3. Jog over to where you want to have your probe, and move down so there is still enough room for any longer tools you’re going to use.
  4. “SetProbe”
  5. “ChangeTool-Thick” (sets your Z zero using the probe)
  6. Run your program. NOTE: this assumes your program doesn’t mess with G92.x or G30.x

When your program is done and you want to change tools…

7)“ReadyChange” to bring the carriage someplace convenient
8)“ChangeTool-Thick” (go set the tool length)
And you can run your next program.

All the old constraints on how you do tool changes on SO3 are still there - it doesn’t support T commands, so you want to generate your gcode as a file per tool. This isn’t a perfect solution obviously, but it works and is easier than jogging all over to get back to your probe and the hassles involved with that. If you always have your probe in the same place (don’t know why you would, but you could) you don’t need to reset the probe position between power cycles, it is stored in eeprom. It will be wiped out on some firmware upgrades though.

You could certainly use this same methodology to do x and y probing on the sides of the probe, but I don’t need it, so didn’t do it.

2 Likes

What do you like about this probing versus UGS’s probe module? I use that and haven’t had many issues with how that works.

I haven’t even tried the UGS probe module. I had read about a year ago (I think) that there were some problems with it, and never went further. I’ll have to look into it.

I’ve had it try and jam an endmill through the wasteboard a few too many times. It was “not working as well as one would hope” - of course, may have been fixed by now…

Got it, I haven’t had any issues lately other than when I forget to change the endmill diameter.

BTW, I didn’t want to go w/o thanking you, even though I’m still digesting everything you posted!

1 Like

Forgot to say- I like this process a little better. I can set where the probe is (important in a second), probe, do a toolpath, then changetool to get the carriage someplace convenient (which ugs probing won’t do) then change the tool, then probe (it goes to the stored position of the probe, so I don’t need to jog to it), probe, and be done. It’s just less messing around, and on any given project with multiple tools, I usually want to probe in the same spot every time.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.