Problem with lead-in

Help for setting up and using
Post Reply
CitizenOfDreams
Posts: 15
Joined: Mon Oct 24, 2016 6:39 pm

Problem with lead-in

Post by CitizenOfDreams »

I tried to make an engraving where every trajectory started with a lead-in. Unfortunately, AutoLeveller seems to be messing up my lead-in moves...

Here is the original code. The cutter spirals down for 1 turn, then makes 1 flat turn:

Code: Select all

G21 G90 G91.1 G64 G40
G0 Z1.5
( T14 : 0.2 )
T14 M6
G17
M3 S8000
G0 X33.9286 Y5.6548
G0 Z1.0
G1 F100.0 Z0.0
G2 F150.0 X34.95 Y7.8187 Z-0.0289 I2.0714 J0.3452
G2 X38.1 Y6.0 Z-0.0789 I1.05 J-1.8187
G2 X34.95 Y4.1813 Z-0.1289 I-2.1 J0.0
G2 X33.9286 Y5.6548 Z-0.15 I1.05 J1.8187
G2 X34.95 Y7.8187 I2.0714 J0.3452
G2 X38.1 Y6.0 I1.05 J-1.8187
G2 X34.95 Y4.1813 I-2.1 J0.0
G2 X33.9286 Y5.6548 I1.05 J1.8187
G0 Z1.5
M5
M30
And here is the autolevelled code. The cutter plunges down all the way into the stock, then spirals up. It seems that the lead-in starting point remained the same while the rest of the trajectory got properly autolevelled.

Code: Select all

G21 G90 G91.1 G64 G40
G0 Z1.5
( T14 : 0.2 )
T14 M6
G17
M3 S8000
G0 X33.9286 Y5.6548
G0 Z1.0
G1 F100.0 Z0.0
G2 F150.0 X34.95 Y7.8187 Z0.62273 I2.0714 J0.3452
G2 X38.1 Y6.0 Z0.63532 I1.05 J-1.8187
G2 X34.95 Y4.1813 Z0.54494 I-2.1 J0.0
G2 X33.9286 Y5.6548 Z0.49820 I1.05 J1.8187
G2 X34.95 Y7.8187Z0.50163 I2.0714 J0.3452
G2 X38.1 Y6.0Z0.56422 I1.05 J-1.8187
G2 X34.95 Y4.1813Z0.52384 I-2.1 J0.0
G2 X33.9286 Y5.6548Z0.49820 I1.05 J1.8187
G0 Z1.5
M5
M30
Here is my probe file:

Code: Select all

0.99766,1.00547,0.01719 
9.06797,1.00547,0.18281 
17.13828,1.00547,0.36016 
25.20859,1.00547,0.50781 
33.27891,1.00547,0.66719 
41.34922,1.00547,0.79297 
41.34922,8.00547,0.75703 
33.27891,8.00547,0.62266 
25.20859,8.00547,0.46484 
17.13828,8.00547,0.29297 
9.06797,8.00547,0.10703 
0.99766,8.00547,-0.05859 
0.99766,15.00547,-0.12578 
9.06797,15.00547,0.04609 
17.13828,15.00547,0.24297 
25.20859,15.00547,0.41953 
33.27891,15.00547,0.59141 
41.34922,15.00547,0.71797 
41.34922,22.00547,0.67813 
33.27891,22.00547,0.55000 
25.20859,22.00547,0.37656 
17.13828,22.00547,0.19141 
9.06797,22.00547,-0.00937 
0.99766,22.00547,-0.21875 
0.99766,29.00547,-0.26094 
9.06797,29.00547,-0.04453 
17.13828,29.00547,0.17578 
25.20859,29.00547,0.36094 
33.27891,29.00547,0.53516 
41.34922,29.00547,0.67578 
41.34922,36.00547,0.65938 
33.27891,36.00547,0.51953 
25.20859,36.00547,0.34609 
17.13828,36.00547,0.16484 
9.06797,36.00547,-0.06094 
0.99766,36.00547,-0.29141 
0.99766,43.00547,-0.29062 
9.06797,43.00547,-0.07578 
17.13828,43.00547,0.14844 
25.20859,43.00547,0.33672 
33.27891,43.00547,0.51094 
41.34922,43.00547,0.64766 
AutoLeveller AE 0.7.8.
CitizenOfDreams
Posts: 15
Joined: Mon Oct 24, 2016 6:39 pm

Re: Problem with lead-in

Post by CitizenOfDreams »

Update: AutoLeveller 0.8.7 non-AE works as expected:

G1 F100.0 Z0.0
becomes
G1 F100 Z0.648199

and the lead-in spirals down just like it was meant to.

Code: Select all

G21 G90 G91.1 G64 G40
G0 Z1.5
( T14 : 0.2 )
T14 M6
G17
M3 S8000
G0 X33.9286 Y5.6548
G0 Z1
G1 F100 Z0.648199
G2 X34.95 Y7.8187 Z0.622724 I2.0714 J0.3452 F150
G2 X38.1 Y6 Z0.635318 I1.05 J-1.8187
G2 X34.95 Y4.1813 Z0.544939 I-2.1 J0
G2 X33.9286 Y5.6548 Z0.498199 I1.05 J1.8187
G2 X34.95 Y7.8187 Z0.501624 I2.0714 J0.3452
G2 X38.1 Y6 Z0.564218 I1.05 J-1.8187
G2 X34.95 Y4.1813 Z0.523839 I-2.1 J0
G2 X33.9286 Y5.6548 Z0.498199 I1.05 J1.8187
G0 Z1.5
M5
M30
daedelus
Site Admin
Posts: 387
Joined: Tue Oct 01, 2013 1:41 pm
Location: London, UK
Contact:

Re: Problem with lead-in

Post by daedelus »

You seem to have a knack of finding quite rare issues :D :D Thats good though because any problem you can find and I fix is a problem that others wont encounter.

Ran some tests on the code you posted and I think I have found the issue and can offer a quick workaround...

AE assumes that any point which has a negative Z value must be a cutting move and autolevels the point. Since Z0.0 is not negative it doesnt autolevel it which is why this first Z moves to the stock instead of Z0.648199.

What I did was change the Z0.0 in the file to Z-0.00001, ran it through AE, and everything looks fine after. You can do the same, and also do a find & replace to track down any other points where Z is 0.

The reason the original AL works OK is because it autolevels points which have a Z <= 0 (whereas AE is just Z < 0). I thought AE was the same as AL in this regard but evidently not. I will fix this when I can but use the workaround in the meantime.

hope this helps,
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
CitizenOfDreams
Posts: 15
Joined: Mon Oct 24, 2016 6:39 pm

Re: Problem with lead-in

Post by CitizenOfDreams »

I guess I'm a trouble magnet. :lol: Thanks for the explanation, now I see what is happening.

This raises another question though. If only the moves below the stock surface are autolevelled, what happens if the clearance plane in the original file was set too low? For instance, all rapid moves occur at Z=1, and the stock is curved so much that its highest point is at Z=2? Will AutoLeveller correct or at least detect this collision?
daedelus
Site Admin
Posts: 387
Joined: Tue Oct 01, 2013 1:41 pm
Location: London, UK
Contact:

Re: Problem with lead-in

Post by daedelus »

I guess the clearance moves would scrape the surface in certain places in these cases but this would be rare and would happen whether or not the file was Autolevelled. There is no way to detect this currently but if you use a probe file then you will be able to see the model of the surface in AE and it will tell you what the highest point is so you can tell if this will clash with your original clearance plane.

AL and AE break each line segment into smaller ones so they can be Autolevelled correctly. It seemed pointless and inefficient to segment and apply levelling calculations for lines where Z is > 0 especially as the original AL programs did not include probe file methods (RPF) and all calculations had to be written to the AL'd gcode file. However, it may be safer to level everything regardless of Z height.

Food for thought, as they say.
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