Need Help with custom probe script

Hi, I am in no way a cnc pro.
However I am trying to make a gcode probe script for a home made block probe.
It has a small lip that bypasses bowl bits bits and takes the reading from the shaft.
I have recently upgraded to millmage and am having to rewrite the gcode macro.
I have made the gcode script (I am no gcode master at all)
I am wondering if anyone could help?
It keeps stopping after every G10 line.
If I copy and paste them insections it works fine, just not as one whole script.
Any help greatly appreciated!!!
thanks

G21 (Set units to mm)
F100 (Set fast probe speed)
G92 X0
G92 Y0
G92 Z0
G91 (Set incremental mode)

G38.2 Z-40 F100 (Fast Probe Z)
G0 Z2 (Retract)
G38.2 Z-10 F10 (Slow Probe Z)
G10 L20 P1 Z31.22 (Set Current Z as plate thickness)

G0 Z5 (Retract to safe height)
G0 X-30 (Move left to clear edge)
G0 Z-35 (move down to under lip on Z)
G38.2 X40 F100 (Fast Probe X)
G0 X-2 (Retract)
G38.2 X5 F10 (Slow Probe X)
G10 L20 P1 X22.145 (no shaft inc)

G0 X-10 (Move away from edge)
G0 Y-20 (move down away from probe)
G0 X30 (Move forward back to probe edge)
G38.2 Y40 F100 (Fast Probe Y)
G0 Y-2 (Retract)
G38.2 Y5 F10 (Slow Probe Y)
G10 L20 P1 Y20.485 (no shaft inc)

G0 Y-15 (Move away from edge)
G0 Z20 (Lift Z)
G90 (Return to absolute mode)
M30

Why? Such a macro is executed by the firmware, not the control software. If you had a working macro before, it should continue to work. MM doesn’t change anything.

It stops at each G10? Then try to remove the empty lines?

Hi, thanks for the feedback.
The touch plate I am using has a lip around the edge and needs more move points than a standard script or it hits it while moving.
The old software I was using took the reading from the bottom right corner and Millmage seems to default to top left, so I am trying to standardize my two touch plates to MM.
Also I dont think removing the empty lines is an issue. I have run the scripts in UGS and it works ok from there.
So I am just not sure what is happening.
Again thanks for the feedback.
I will try again and see what happens.
thanks

Then you just configured MM not to your setup. You can change any reference position in MM as you like. As I said, all positioning and script execution is a firmware thing, MM won’t change anything. If it has worked before, it should work now as well.

  1. Unless your Touch Block is moving around, why are you using Incremental mode?
  2. P1 is G54. Your controller may be treating the G10 as an non-continue command. Why not use G54 Z31.22 instead?
  3. An image of your setup would help us understand why your probe cycle needs to be so complex.

Hi, thanks Mikey and misken,
I am pretty sure it is my system that is at fault. When I run the old scripts it also freezes after each probe distance set. Any G92,G10 or G54 in MM. UGS seems to still work (mostly).
I have a standard block probe I use for all my straight bits, standard MM probe works fine.
I also have a custom probe block for bowl and round-over bits. It is designed so no matter what bit or what size it takes the zero ref off of the shaft so all you ever have to is enter the shaft size not the end size.
I will attach a picture.
Thanks for your help, and patience, am no expert.


Same here. Those images explain what you were saying. Novel concept touching off the shank instead of the tool tip. I added it to my “What Else Can I Do” book.