Machsupport Forum

G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: 4z7 on December 10, 2008, 08:05:57 PM

Title: G31 Parameters to improve probe accuracy
Post by: 4z7 on December 10, 2008, 08:05:57 PM
I'm trying to find more information on G31 Straight Probe Command.  What I specifically want to accomplish is to improve the accuracy of my probe in X,Y.  The Mach user guide mentions that parameters can be entered to setup the "effective radii" of the probe tip, but doesn't say which parameters or how to enter a value.   

My plan is to table mount a known accurate shape, then probe it to calculate and set the X+-,Y+- compensation parameters. 

If someone could direct me to a complete documentation on G31 Code, I'd appreciate it.  Also I'd like to know if G-Code with parameters like G31 is specific to Mach3 or universal.  Although the Mach3 Mill guide has a very good programming reference, does anyone have a recommendation for G-Code reference?

Title: Re: G31 Parameters to improve probe accuracy
Post by: vmax549 on December 11, 2008, 01:03:55 AM
There is a entry point DRO  in MACH that you can input the tip diameter and it will do all the compensation of the probe data to account for x/y tip diameter compensation(;-) THe manual is a bit outdated. It will save you a ton of work if you are probing a 2d shape in x/y and need accurate dimensions.

Just a thought (;-) TP
Title: Re: G31 Parameters to improve probe accuracy
Post by: 4z7 on December 11, 2008, 11:49:14 PM
Thanks vmax for your help.  I did figure some things out most importantly of which is that parameters are VB variables and not really a part of the g-Code.  I mistakenly thought that parameters like #1023 or even #2000 were specific to G31.  

I store the probe dia as a tool dia so that's no problem there and I know the diameter to about +-0.0003".  The inaccuracy is in aligning the tip in the spindle with the probe alignment mechanism, tool holder, collet, and the spindle taper itself all having some inaccuracy.  So just randomly inserting the probe in the spindle gives me an accuracy of maybe +- 0.004 which is close enough for somethings but not everything.

So I made a screen button that probes a 123 block that claims to be accurate to 0.00005" and  touches off the 4 different sides of the probe tip
Xleft, Xright, Yforward, Yback.  With the known 123 block dimensions and probe tip diameter, it calculates 4 different probe radii to use.  I store these radii in parameters #5301= XleftRad, #5321=XrightRad, #5302=YForwardtRad, and #5321=YBackRad.  I do not know if it correct to use these paramaters for storage but it seems to work and these parameter numbers are remembered when restarted.

On all  other X/Y probe buttons, I changed the calculations to use appropriate GetVar(53XX) in place of ProbeDiameter/2.

Title: Re: G31 Parameters to improve probe accuracy
Post by: vmax549 on December 12, 2008, 07:45:28 PM
Please be careful of the parameters you use. THere are ranges of parms for users to use. (check the manual) if you wonder into mach's operational parameters you can cause havic to mach and wizards and other things(;-) Been there done that too(;-).

IF the parms you used are still there AFTER a restart of mach then they are probably used by mach somewhere(;-) Check the XML file and you may see them stored there.

IF you use the mach tip comp then the saved data points will already be comped for the tip radius(;-) so THE NUMBERS FROM THE #2000-2002 PARAMETERS will be as acurate as your probe. You can also set up a set of DROs that will show what the probed xy values really are as they generate ( CMM style)

THere is a calibration test other MANF use to calibrate the probe. It is a ball/hole test.  There is a know diameter hole to test the tip offset setting and a ball on a swival stem. You put in a test bar in your spindle and do a small circle (the diameter of the ball plus bar radius)  around the ball. THis pushes the ball into the exactly center point of the spindle. Then you install the probe and probe for the center of the ball(sphere) the difference in the actual center and the probed center is the calibration error of the probe centerline.

Hope that helps, (;-)TP
Title: Re: G31 Parameters to improve probe accuracy
Post by: 4z7 on December 15, 2008, 12:42:41 PM
I don't know where the mach tip compensation is.  Is there a .dll plugin I need to install and is there a screen .set file with the procedures/ DROs etc?  Is it a wizard?  The parameters I use to store the 4 compensation values are fixture X and Y values.  I never have used more than G54 and G55 and whenvever I have looked at the fixture table I've always seen all the other values just zeroed.  I don't have accurate home switches to trust a saved fixture other than as an approximation, so I don't really understand the advantages of all the fixtures, except now to use as remembered parameter values.  Thanks again for your help vmax
Title: Re: G31 Parameters to improve probe accuracy
Post by: vmax549 on December 16, 2008, 09:10:36 AM
Look on the "Settings" page left hand side in the SPecial Functions Box it is called probe tip comp. IF you put a value in then MACH will comp the x/y values of the saved points file or the #2000 #2001 parameters.

IF you set the value to ZERO then MAch does NOT comp.

(;-) TP