0.8.3 stuck in infinite loop

Report problems here
kvnrydberg
Posts: 19
Joined: Thu Jul 17, 2014 4:46 am

0.8.3 stuck in infinite loop

Post by kvnrydberg » Fri Jul 18, 2014 3:51 am

Like most people, I use Autoleveller for etching PCBs. Unlike most people (prolly), I draw my circuits with Adobe Illustrator. For the traces I use a blob brush stroke and draw them freehand from pad to pad. I like to do it this way because I can layout a very large circuit fluidly. (It's also a damn good puzzle.) But I do end up with a lot of little rough edges on my traces. When I'm done with the drawing and have checked for errors (though I always miss at least one F-up), I export it to a .dxf file and produce the Gcode with CamBam. As you can imagine, one of the problems with this is there are an enormous amount of little arcs in the Gcode. It takes CamBam nearly 20 minutes to process some of my .dxf files.

Now to the point, I have used AL 8.2 to good effect on these Gcode files. Both on Gcode files with G2 and G3 commands, and those that have been converted to straight lines. The only problem I have had is when the arc is very large, a circle for example. Then the AL output gets a little wanky.

But with version 8.3 I've had some other problems with Gcode files that contain G2,G3 commands. The first G-code file I tried was processed from a fairly densely populated 5"x7" PCB. Quite a large number of traces and thus many little arcs. The result was a success. The second G-code file I tried was the top layer of the same PCB, not nearly as many traces but still in the same area. When I pressed the "create leveled G-code" button, the designated file appeared in the appropriate directory, and I could load it with Mach3, but it wasn't complete. Also, it appeared that AL had hung up, as it wouldn't respond to further prodding. Upon further inspection though, AL was still working on the same leveled G-code file. Curious, I let it go for upwards of 5 minutes while I watched the output file get bigger and bigger. After 115 megs worth of data, I figured it was probably in a loop. Which it was.

Next I tried the same file with AL 8.2. It worked. So I looked at the original G-code file, the AL 8.2 output, and the AL 8.2 output side-by-side. Besides for the leveling calculations, the original and 8.2 were exactly the same. Now, the original and 8.3 were exactly the same up to a point. At this point, 8.3 began to output an endless repetition of two lines, one after the other. Neither of these two lines were in the original. I looked at where exactly this was on my drawing, and lo and behold, it was precisely where one of those jagged little edges were on my brush stroke. It may be coincidental, as there are hundreds of such tiny little zigs and zags that didn't cause an error.

I did try this several times with 8.3 , all with the same result. So I wonder if you can have a look at my files and maybe you can see something the matter. I truncated the 8.2 and 8.3 files. Only the 8.2 file has the probe codes, which are the same as in the 8.3 file. And you can see at the end of 8.3 where it begins to differ and repeat itself.

TL;DR The AL 8.3 output from a G-Code file that contains G2 and G3 commands and many little zigs and zags began to repeat the same two G3 clusters without end. I have attached the offending files.
Attachments
Version8.3.Arcs.Error.nc
(15.52 KiB) Downloaded 46 times
Version8.2Arcs.Good.nc
(40.49 KiB) Downloaded 44 times
Original G-Code.nc
(98.29 KiB) Downloaded 43 times

Zig
Posts: 27
Joined: Wed Oct 02, 2013 12:29 pm

Re: 0.8.3 stuck in infinite loop

Post by Zig » Fri Jul 18, 2014 8:11 am

DXF files are notorious for producing lines whihc ought to joined but in reality are disjointed.

I do not know if Your original DXF data suffers from this afliction. One of the problems is that arcs and circles end up with mismatched attributes ( radius versus end points ).

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

Re: 0.8.3 stuck in infinite loop

Post by daedelus » Fri Jul 18, 2014 8:39 am

I shall have a look for sure and report back shortly :) thanks.
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: 0.8.3 stuck in infinite loop

Post by kvnrydberg » Fri Jul 18, 2014 5:23 pm

Hey Zig. I wasn't aware of this. The .dxf format may be the problem, but I don't think so. I have looked at the particular .dxf file at very high magnification and seen no discontinuities. And CamBam posts a warning when a MOP is done on a disjointed path. Also, wouldn't Mach3 protest when the radius doesn't match the end points? On the other hand, CamBam has a "join" feature which joins paths that are as close as a specified tolerance, so I will try this and see if it helps.

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

Re: 0.8.3 stuck in infinite loop

Post by kvnrydberg » Fri Jul 18, 2014 7:58 pm

Update: It didn't help.

Zig
Posts: 27
Joined: Wed Oct 02, 2013 12:29 pm

Re: 0.8.3 stuck in infinite loop

Post by Zig » Fri Jul 18, 2014 10:03 pm

Yes MACH ought to report this.

I use LinuxCNC and it does report issues of this kind if outside specified tollerance.


EDIT: can You post the DXF file?

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

Re: 0.8.3 stuck in infinite loop

Post by kvnrydberg » Fri Jul 18, 2014 11:21 pm

No. I tried. The size of the file far exceeds the 256k upload limit for this forum.

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

Re: 0.8.3 stuck in infinite loop

Post by daedelus » Sun Jul 20, 2014 11:09 am

Just to keep you informed, I am working on this and making some progress but its tricky to locate the initial cause of the infinite loop.

I am wondering if its easy for you to convert the file to millimeters and not inches and run it through autoleveller? I am currently thinking the problem is to do with the units used.
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: 0.8.3 stuck in infinite loop

Post by kvnrydberg » Mon Jul 21, 2014 7:43 am

Well, you're right about that. I converted my .dxf file to millimeters, then had cambam produce the g-code in millimeters, and AL worked its magic. What gives?

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

Re: 0.8.3 stuck in infinite loop

Post by daedelus » Mon Jul 21, 2014 8:45 am

Thanks for that, that helps me a lot in narrowing down the problem.

Im still not quite sure why there should be an issue with inches but my new tests should flush out the problem :)
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