No Levelled GCode file is created

Report problems here
GastonGagnon
Posts: 11
Joined: Wed Jul 16, 2014 5:21 pm

Re: No Levelled GCode file is created

Post by GastonGagnon »

This may explain the discrepancy between the set value for the probe position (PFG) and the actual probe position in the log file (RPF).
http://www.machsupport.com/Mach3Wiki/in ... om_a_Probe
daedelus
Site Admin
Posts: 387
Joined: Tue Oct 01, 2013 1:41 pm
Location: London, UK
Contact:

Re: No Levelled GCode file is created

Post by daedelus »

Not sure. Here is a RPF from Mach3 I created earlier as part of my tests:

Code: Select all

0.00000,-0.00000,0.00020 
0.38984,-0.00000,0.00215 
0.77968,-0.00000,0.00517 
1.16952,-0.00000,0.00695 
1.55936,-0.00000,0.00850 
1.94920,-0.00000,0.00898 
2.33904,-0.00000,0.00889 
2.72888,-0.00000,0.00823 
3.11873,-0.00000,0.00729 
3.50857,-0.00000,0.00547 
3.89841,-0.00000,0.00303 
3.89841,0.38746,0.00258 
3.50857,0.38746,0.00444 
3.11873,0.38746,0.00574 
2.72888,0.38746,0.00649 
2.33904,0.38746,0.00687 
1.94920,0.38746,0.00689 
1.55936,0.38746,0.00660 
1.16952,0.38746,0.00583 
0.77968,0.38746,0.00415 
0.38984,0.38746,0.00245 
0.00000,0.38746,0.00097 
0.00000,0.77490,0.00232 
0.38984,0.77490,0.00268 
0.77968,0.77490,0.00397 
1.16952,0.77490,0.00460 
1.55936,0.77490,0.00488 
1.94920,0.77490,0.00509 
2.33904,0.77490,0.00514 
2.72888,0.77490,0.00461 
3.11873,0.77490,0.00432 
3.50857,0.77490,0.00332 
3.89841,0.77490,0.00260 
3.89841,1.16236,-0.00975 
3.50857,1.16236,0.00386 
3.11873,1.16236,0.00441 
2.72888,1.16236,0.00472 
2.33904,1.16236,0.00495 
1.94920,1.16236,0.00492 
1.55936,1.16236,0.00508 
1.16952,1.16236,0.00472 
0.77968,1.16236,0.00426 
0.38984,1.16236,0.00398 
0.00000,1.16236,0.00438 
0.00000,1.54980,0.00495 
0.38984,1.54980,0.00421 
0.77968,1.54980,0.00435 
1.16952,1.54980,0.00463 
1.55936,1.54980,0.00432 
1.94920,1.54980,0.00434 
2.33904,1.54980,0.00449 
2.72888,1.54980,0.00412 
3.11873,1.54980,0.00395 
3.50857,1.54980,0.00364 
3.89841,1.54980,-0.01173 
3.89841,1.93725,0.00429 
3.50857,1.93725,0.00420 
3.11873,1.93725,0.00474 
2.72888,1.93725,0.00501 
2.33904,1.93725,0.00488 
1.94920,1.93725,0.00486 
1.55936,1.93725,0.00529 
1.16952,1.93725,0.00503 
0.77968,1.93725,0.00478 
0.38984,1.93725,0.00497 
0.00000,1.93725,0.00546 
0.00000,2.32470,0.00523 
0.38984,2.32470,0.00471 
0.77968,2.32470,0.00489 
1.16952,2.32470,0.00514 
1.55936,2.32470,0.00537 
1.94920,2.32470,0.00527 
2.33904,2.32470,0.00518 
2.72888,2.32470,0.00512 
3.11873,2.32470,0.00529 
3.50857,2.32470,0.00508 
3.89841,2.32470,0.00503 
3.89841,2.71215,0.00566 
3.50857,2.71215,0.00643 
3.11873,2.71215,0.00654 
2.72888,2.71215,0.00672 
2.33904,2.71215,0.00663 
1.94920,2.71215,0.00652 
1.55936,2.71215,0.00643 
1.16952,2.71215,0.00646 
0.77968,2.71215,0.00606 
0.38984,2.71215,0.00514 
0.00000,2.71215,0.00541 
0.00000,3.09959,0.00547 
0.38984,3.09959,0.00584 
0.77968,3.09959,0.00718 
1.16952,3.09959,0.00795 
1.55936,3.09959,0.00843 
1.94920,3.09959,0.00834 
2.33904,3.09959,0.00869 
2.72888,3.09959,0.00838 
3.11873,3.09959,0.00820 
3.50857,3.09959,0.00766 
3.89841,3.09959,0.00637 
There are 11 different X values and 9 different Y values, totaling 99 probed points.

As you can see, it uses 5 decimal places for each axis and even at 5dp the values are exact.

Here is the PFG for that:

Code: Select all

(AutoLeveller, Version: 0.8.0, http://autoleveller.co.uk)
(Copyright 2013 James Hawthorne PhD)
(Original file: spindle.top.etch.tap)
(Creation date: 31/05/2014 time: 16:42)

(This program and any of its output is licensed under GPLv2 and as such...)
(AutoLeveller comes with ABSOLUTELY NO WARRANTY; for details, see sections 11 and 12 of the GPLv2)

(prerequisites)
(1. need a working probe)
(2. tool needs to be within 3/8" of copper board for the 1st probe, )
(i.e. Z0.000 should be no more than 3/8" above the board initially)
(Note: The first probe will touch off Z to 0.000 when it first touches to copper, )
(all other probe values are relative to this first point)

G20 (Inches)
G90 (absolute distance mode, not incremental)

(begin initial probe and set Z to 0)
G0 X0 Y0 Z0
G31 Z-0.375 F5
G92 Z0
G0 Z0.125
G31 Z-0.0625 F2.5
G92 Z0
M40 (Begins a probe log file, when the window appears, enter a name for the log file such as "ALProbe.txt")
G0 Z0.125
G0 X0 Y0
G31 Z-0.0625 F5
G0 Z0.125
G0 X0.38984 Y0
G31 Z-0.0625 F5
G0 Z0.125
G0 X0.77968 Y0
G31 Z-0.0625 F5
G0 Z0.125
G0 X1.16952 Y0
G31 Z-0.0625 F5
G0 Z0.125
G0 X1.55936 Y0
G31 Z-0.0625 F5
G0 Z0.125
G0 X1.9492 Y0
G31 Z-0.0625 F5
G0 Z0.125
G0 X2.33904 Y0
G31 Z-0.0625 F5
G0 Z0.125
G0 X2.72888 Y0
G31 Z-0.0625 F5
G0 Z0.125
G0 X3.11872 Y0
G31 Z-0.0625 F5
G0 Z0.125
G0 X3.50856 Y0
G31 Z-0.0625 F5
G0 Z0.125
G0 X3.8984 Y0
G31 Z-0.0625 F5
G0 Z0.125
G0 X3.8984 Y0.38745
G31 Z-0.0625 F5
G0 Z0.125
G0 X3.50856 Y0.38745
G31 Z-0.0625 F5
G0 Z0.125
G0 X3.11872 Y0.38745
G31 Z-0.0625 F5
G0 Z0.125
G0 X2.72888 Y0.38745
G31 Z-0.0625 F5
G0 Z0.125
G0 X2.33904 Y0.38745
G31 Z-0.0625 F5
G0 Z0.125
G0 X1.9492 Y0.38745
G31 Z-0.0625 F5
G0 Z0.125
G0 X1.55936 Y0.38745
G31 Z-0.0625 F5
G0 Z0.125
G0 X1.16952 Y0.38745
G31 Z-0.0625 F5
G0 Z0.125
G0 X0.77968 Y0.38745
G31 Z-0.0625 F5
G0 Z0.125
G0 X0.38984 Y0.38745
G31 Z-0.0625 F5
G0 Z0.125
G0 X0 Y0.38745
G31 Z-0.0625 F5
G0 Z0.125
G0 X0 Y0.7749
G31 Z-0.0625 F5
G0 Z0.125
G0 X0.38984 Y0.7749
G31 Z-0.0625 F5
G0 Z0.125
G0 X0.77968 Y0.7749
G31 Z-0.0625 F5
G0 Z0.125
G0 X1.16952 Y0.7749
G31 Z-0.0625 F5
G0 Z0.125
G0 X1.55936 Y0.7749
G31 Z-0.0625 F5
G0 Z0.125
G0 X1.9492 Y0.7749
G31 Z-0.0625 F5
G0 Z0.125
G0 X2.33904 Y0.7749
G31 Z-0.0625 F5
G0 Z0.125
G0 X2.72888 Y0.7749
G31 Z-0.0625 F5
G0 Z0.125
G0 X3.11872 Y0.7749
G31 Z-0.0625 F5
G0 Z0.125
G0 X3.50856 Y0.7749
G31 Z-0.0625 F5
G0 Z0.125
G0 X3.8984 Y0.7749
G31 Z-0.0625 F5
G0 Z0.125
G0 X3.8984 Y1.16235
G31 Z-0.0625 F5
G0 Z0.125
G0 X3.50856 Y1.16235
G31 Z-0.0625 F5
G0 Z0.125
G0 X3.11872 Y1.16235
G31 Z-0.0625 F5
G0 Z0.125
G0 X2.72888 Y1.16235
G31 Z-0.0625 F5
G0 Z0.125
G0 X2.33904 Y1.16235
G31 Z-0.0625 F5
G0 Z0.125
G0 X1.9492 Y1.16235
G31 Z-0.0625 F5
G0 Z0.125
G0 X1.55936 Y1.16235
G31 Z-0.0625 F5
G0 Z0.125
G0 X1.16952 Y1.16235
G31 Z-0.0625 F5
G0 Z0.125
G0 X0.77968 Y1.16235
G31 Z-0.0625 F5
G0 Z0.125
G0 X0.38984 Y1.16235
G31 Z-0.0625 F5
G0 Z0.125
G0 X0 Y1.16235
G31 Z-0.0625 F5
G0 Z0.125
G0 X0 Y1.5498
G31 Z-0.0625 F5
G0 Z0.125
G0 X0.38984 Y1.5498
G31 Z-0.0625 F5
G0 Z0.125
G0 X0.77968 Y1.5498
G31 Z-0.0625 F5
G0 Z0.125
G0 X1.16952 Y1.5498
G31 Z-0.0625 F5
G0 Z0.125
G0 X1.55936 Y1.5498
G31 Z-0.0625 F5
G0 Z0.125
G0 X1.9492 Y1.5498
G31 Z-0.0625 F5
G0 Z0.125
G0 X2.33904 Y1.5498
G31 Z-0.0625 F5
G0 Z0.125
G0 X2.72888 Y1.5498
G31 Z-0.0625 F5
G0 Z0.125
G0 X3.11872 Y1.5498
G31 Z-0.0625 F5
G0 Z0.125
G0 X3.50856 Y1.5498
G31 Z-0.0625 F5
G0 Z0.125
G0 X3.8984 Y1.5498
G31 Z-0.0625 F5
G0 Z0.125
G0 X3.8984 Y1.93725
G31 Z-0.0625 F5
G0 Z0.125
G0 X3.50856 Y1.93725
G31 Z-0.0625 F5
G0 Z0.125
G0 X3.11872 Y1.93725
G31 Z-0.0625 F5
G0 Z0.125
G0 X2.72888 Y1.93725
G31 Z-0.0625 F5
G0 Z0.125
G0 X2.33904 Y1.93725
G31 Z-0.0625 F5
G0 Z0.125
G0 X1.9492 Y1.93725
G31 Z-0.0625 F5
G0 Z0.125
G0 X1.55936 Y1.93725
G31 Z-0.0625 F5
G0 Z0.125
G0 X1.16952 Y1.93725
G31 Z-0.0625 F5
G0 Z0.125
G0 X0.77968 Y1.93725
G31 Z-0.0625 F5
G0 Z0.125
G0 X0.38984 Y1.93725
G31 Z-0.0625 F5
G0 Z0.125
G0 X0 Y1.93725
G31 Z-0.0625 F5
G0 Z0.125
G0 X0 Y2.3247
G31 Z-0.0625 F5
G0 Z0.125
G0 X0.38984 Y2.3247
G31 Z-0.0625 F5
G0 Z0.125
G0 X0.77968 Y2.3247
G31 Z-0.0625 F5
G0 Z0.125
G0 X1.16952 Y2.3247
G31 Z-0.0625 F5
G0 Z0.125
G0 X1.55936 Y2.3247
G31 Z-0.0625 F5
G0 Z0.125
G0 X1.9492 Y2.3247
G31 Z-0.0625 F5
G0 Z0.125
G0 X2.33904 Y2.3247
G31 Z-0.0625 F5
G0 Z0.125
G0 X2.72888 Y2.3247
G31 Z-0.0625 F5
G0 Z0.125
G0 X3.11872 Y2.3247
G31 Z-0.0625 F5
G0 Z0.125
G0 X3.50856 Y2.3247
G31 Z-0.0625 F5
G0 Z0.125
G0 X3.8984 Y2.3247
G31 Z-0.0625 F5
G0 Z0.125
G0 X3.8984 Y2.71215
G31 Z-0.0625 F5
G0 Z0.125
G0 X3.50856 Y2.71215
G31 Z-0.0625 F5
G0 Z0.125
G0 X3.11872 Y2.71215
G31 Z-0.0625 F5
G0 Z0.125
G0 X2.72888 Y2.71215
G31 Z-0.0625 F5
G0 Z0.125
G0 X2.33904 Y2.71215
G31 Z-0.0625 F5
G0 Z0.125
G0 X1.9492 Y2.71215
G31 Z-0.0625 F5
G0 Z0.125
G0 X1.55936 Y2.71215
G31 Z-0.0625 F5
G0 Z0.125
G0 X1.16952 Y2.71215
G31 Z-0.0625 F5
G0 Z0.125
G0 X0.77968 Y2.71215
G31 Z-0.0625 F5
G0 Z0.125
G0 X0.38984 Y2.71215
G31 Z-0.0625 F5
G0 Z0.125
G0 X0 Y2.71215
G31 Z-0.0625 F5
G0 Z0.125
G0 X0 Y3.0996
G31 Z-0.0625 F5
G0 Z0.125
G0 X0.38984 Y3.0996
G31 Z-0.0625 F5
G0 Z0.125
G0 X0.77968 Y3.0996
G31 Z-0.0625 F5
G0 Z0.125
G0 X1.16952 Y3.0996
G31 Z-0.0625 F5
G0 Z0.125
G0 X1.55936 Y3.0996
G31 Z-0.0625 F5
G0 Z0.125
G0 X1.9492 Y3.0996
G31 Z-0.0625 F5
G0 Z0.125
G0 X2.33904 Y3.0996
G31 Z-0.0625 F5
G0 Z0.125
G0 X2.72888 Y3.0996
G31 Z-0.0625 F5
G0 Z0.125
G0 X3.11872 Y3.0996
G31 Z-0.0625 F5
G0 Z0.125
G0 X3.50856 Y3.0996
G31 Z-0.0625 F5
G0 Z0.125
G0 X3.8984 Y3.0996
G31 Z-0.0625 F5
G0 Z0.125
G0 X0 Y0 Z1
M41 (Closes the opened log file)

M2
%
http://www.autoleveller.co.uk/. Software to probe and adjust a GCode file for PCB's or any probe-able surface.

http://www.autoleveller.co.uk/cnc-probe-guide/. A short guide to setting up the probe.

-James
GastonGagnon
Posts: 11
Joined: Wed Jul 16, 2014 5:21 pm

Re: No Levelled GCode file is created

Post by GastonGagnon »

Hi James,
Not to be picky but not quite exact either; the fifth decimal is slightly different for a few of your x and y probe values.
Nonetheless, that demonstrates that your machine is capable of positioning the tool within 10 micro inches of the gcode command. That is some high resolution and repeatability! Mine is quite lame with its ~30 micro inches ;)

Interesting, but aren't we splitting hairs a little? We are making pcbs after all.

Gaston
daedelus
Site Admin
Posts: 387
Joined: Tue Oct 01, 2013 1:41 pm
Location: London, UK
Contact:

Re: No Levelled GCode file is created

Post by daedelus »

Yes, you are right, I noticed this too. It is strange that the 5th place is always rounded to the same number in every case. Maybe I uploaded the wrong PFG for the RPF. Confused as to what ive done :? I shall have to re-test and better organise my files at some point

Anyway, I have given it a small bit of tolerance when reading from the RPF now so that you have some leeway regarding X and Y axis within reason. I will upload this change after some other changes I need to make and you should no longer have problems regarding this :D
http://www.autoleveller.co.uk/. Software to probe and adjust a GCode file for PCB's or any probe-able surface.

http://www.autoleveller.co.uk/cnc-probe-guide/. A short guide to setting up the probe.

-James
GastonGagnon
Posts: 11
Joined: Wed Jul 16, 2014 5:21 pm

Re: No Levelled GCode file is created

Post by GastonGagnon »

Looking forward for it. Thank you James.

I'm astonished that my machine can stop within 30 micro-inch from the gcode command. If I'm not mistaken this is roughly 1 micrometer.
I wish others would chime in and tell us what resolution they can get on their machine.

Gaston
kvnrydberg
Posts: 19
Joined: Thu Jul 17, 2014 4:46 am

Re: No Levelled GCode file is created

Post by kvnrydberg »

I'm confused... Unless you're using encoders isn't Mach3 in the dark as to where the machine actually is? So when Mach3 executes a g-code command to X*** doesn't it think it's at exactly ***. I know it happens when my machine hops up to the clearance plane which i usually set at .1250", that sometimes the DROs read .1249", but isn't this just dirt and aren't all machines subject to this? So wouldn't any discrepancies in the RPF and PFG come solely from Mach3? Or am I in the dark? Anyway, I use standard acme leadscrews and steppers and, when checked with a dial indicator, my machine usually stops to within .0005" from the target on any small (<1") move. If the motors are tuned properly. But over the entire working area, which is about 24"x24" on my machine, I don't expect better than .005" accuracy.
GastonGagnon
Posts: 11
Joined: Wed Jul 16, 2014 5:21 pm

Re: No Levelled GCode file is created

Post by GastonGagnon »

Yes, you are right, I was confused.
I have no encoder so Mach3 has to presume the actual position is where the DROs point.

After observation, the DROs indicate the PFG GCode coordinate values rounded to 4 decimal places.

The after executing a G31, the variables 2000,2002 and 2002 contain the x,y and z with a huge number of decimals.
The RPF reports those variables values rounded to 5 places.

To add to the problem, if Backlash is enable in Mach3, the setting values are added to the variables content.

Why could AL simply use the RPF z values and take for granted that the x and y positions are correct?
daedelus
Site Admin
Posts: 387
Joined: Tue Oct 01, 2013 1:41 pm
Location: London, UK
Contact:

Re: No Levelled GCode file is created

Post by daedelus »

The problem is that the AL creates a grid from the RPF (the RPF is an ordered but unstructured list so it does not know how many rows or columns there are directly from the RPF). If an X value is exactly the same as the previously X value, it assumes that point belongs in the same column on the grid. If the X value deviates even slightly from the previous X, it will assume the point needs to be added to a new column. The same is true for Y values. So if the first X value was 1.2345 for example, AL would see no difference the next X value between 1.2346 and 55.7. In both cases these values differ from the first and it would put both in a new column.

In the soon to be released fix, AL adds some tolerance to this (using the first read point as a reference to subsequent points), so 1.2346 would be added to the previous column whereas 55.7 would not. Thats essentially what it does now.
http://www.autoleveller.co.uk/. Software to probe and adjust a GCode file for PCB's or any probe-able surface.

http://www.autoleveller.co.uk/cnc-probe-guide/. A short guide to setting up the probe.

-James
kvnrydberg
Posts: 19
Joined: Thu Jul 17, 2014 4:46 am

Re: No Levelled GCode file is created

Post by kvnrydberg »

That makes sense about the backlash adjustment being added to the x and y pos. That must be why we're having trouble and you're not. We have backlash enabled, and you don't. Or no? Now I've got a fairly new machine with the most backlash on my X-axis which is set for .0015" compensation. Will this still be within tolerance? And will a machine with an even larger amount of compensation in Mach3 (neighborhood of ten thousandths, which is pretty common I guess) still be within tolerance?
daedelus
Site Admin
Posts: 387
Joined: Tue Oct 01, 2013 1:41 pm
Location: London, UK
Contact:

Re: No Levelled GCode file is created

Post by daedelus »

I use a demo version of Mach3 for testing (I use LinuxCNC primarily) and havent touched any backlash settings so maybe thats it, yes.

With regards to tolerance, it now truncates any value it finds to 2dp (rounding can cause other problems) so a value of 1.48754 would be truncated to 1.48. This value is compared to the next value, so for example if it is 1.48732, It will also get truncated to 1.48. So, if your X values are the same to 2dp you should be fine. Its very unlikely that anyone has rows or columns which are closer but the change should allow enough tolerance for most.

Anyway, I shall upload the fix later today, whether I have or have not fixed the other problem (its a bit of a needle in a haystack type problem), I will let you know.
http://www.autoleveller.co.uk/. Software to probe and adjust a GCode file for PCB's or any probe-able surface.

http://www.autoleveller.co.uk/cnc-probe-guide/. A short guide to setting up the probe.

-James
Post Reply