I’ve been experimenting with the G38.2 Probe command. After some early confusion with the Touch Plate widget in Chilipeppr, I don’t plan on machining PCBs, I drove into the widget’s programming to learn why my results were varying.
I’ve now started working a new, fairly comprehensive, widget as one of my discoveries is the current widget resets the machine absolute z-value. Coming from a manufacturing background, I would prefer that once I home the machine that the machine zero remains at X-min, Y-min, and Z-max. (My Gcode files generally contain a G53 Z0 at the end of the program to clear the head from the workspace. This is a bad idea if absolute Z0 has been redefined to the top of the work piece or the machine bed.)
Through my testing and development, here are a few items I’ve learned.
G38.2 runs in the machine coordinate system (G53) and machine units (mm).
The code line is: G38.2 Xn Yn Zn Fn
Zn (where n = the designation value)
Fn (where n = the feed rate in mm/min)
(TinyG will accept multiple axes in the arguments)
Reading the TinyG programming, G38.2 requires Fn but actually testing shows that it is optional. I highly recommend defining the feed rate as the command will read the last issued feed rate and apply it to the probe cycle. (not a good idea if the last F-value was 2000 mm/min)
Rotational axes (A, B, C) are not allowed as target values
Minimum probe travel: The command will run with differences less than the 0.254mm as defined in the TinyG programming. (On a test frame, I’ve run values as small as 0.001mm, but have not tested for accuracy on a physical machine. I believe best results are to use travel values greater the 0.254mm)
G91 (relative distance mode) has no effect on the G38.2 command. G38.2 runs in the absolute coordinate system and the axis words are also values in the absolute coordinate system.
When the command is executed, the controller switches to the machine’s absolute coordinate system. The axis word(s) is the designation point. The machine will move from its current position to the designation point. If the:
designation point value > machine point, the head moves
away from the work surface,
designation point value < machine point value, the head moves
towards the work surface.
Hopefully these tips will help anyone working on developing probing routines.
Hats off to John and everyone that continues to develop Chilipeppr into a comprehensive CNC software package, great job everyone.