GCode extension path to gcode unnecessary Z raises

Post about using Inkscape with cutters or plotters.
DRobs86
Posts: 12
Joined: Mon Jun 22, 2015 11:45 am

GCode extension path to gcode unnecessary Z raises

Postby DRobs86 » Sat Jul 18, 2015 10:18 pm

I am using the Gcode extension to generate some cutting paths for my CNC machine. Let's just say that I'm cutting a circular path with a step down of 3mm and a total depth of 6mm, so there are two passes on the circle. The Gcode that gets generated causes the machine to plunge to 3mm, cut the circle, then raise Z to my Z safe height, and plunge directly back down to the next step down (6mm in this case). I end up wasting a lot of time on my machining operations with my machine constantly lifting and replunging for no reason. To put it another way, the code lifts Z right before it drops Z to the next level.

I feel like there must be a way around this.

Any advice?

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: GCode extension path to gcode unnecessary Z raises

Postby brynn » Sun Jul 19, 2015 1:11 pm

I've never actually used the extension, or a CNC machine, although I know a little about woodworking, and understand generally how they work. Someone may come along who can give you a quick answer. But meanwhile, I could ask a few questions, and we might find the answer.

My very first thought is that maybe the machine is reaching the end of a path, while the next path starts at the same place. Maybe the paths need to be joined? But that's probably a premature guess.

How do you normally tell the machine when to go to a new depth? Are there different paths with different widths? Or different colors?

User avatar
ragstian
Posts: 1181
Joined: Thu Oct 11, 2012 2:44 am
Location: Stavanger-Norway

Re: GCode extension path to gcode unnecessary Z raises

Postby ragstian » Sun Jul 19, 2015 5:19 pm

Hi

From looking at videos on the net I see that this is quite common even to g-code produced by other (professional?) programs.

I see three different "solutions" to the problem;

1. The first one would be to manually edit the g-code in a text or g-code editor and remove the "offending" code.
For large g-code files this would be rather tedious and prone to introducing errors.

2. The second method would be to use a second program (called "post-processor" in the CNC-circles) to remove the Z-moves automatically. Several "post-processors"
are available.

3. The third and probably the most elegant solution would be to edit the Inkscape extension incorporating some "logic" to the code which will check for no X or Y movement
between Z-up and Z-down and then skip the Z-up/Z-down. The logic would have to leave the Z-up/Z-down used in peck drilling alone.

Which version of the extension do you use?
Will look into this very soon as a new CNC machine is heading my way! Yippi! :D

See these links;
http://www.cnccookbook.com/CCCNCGCodeDialects.htm
http://camzone.org/2012/01/14/post-processors-what-you-should-know-about-them/
http://www.cnccookbook.com/CCGWizardE.html
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: GCode extension path to gcode unnecessary Z raises

Postby brynn » Sun Jul 19, 2015 6:32 pm

ragstian wrote:3. The third and probably the most elegant solution would be to edit the Inkscape extension.....


Well yes, that would seem the best idea. If it's a problem with the code -- write better code!

Or if it's some either unavoidable issue, or very hard to fix issue, there may be other workaround discussed in CNC forums. Have you seen this forum....hhmm.... Well I was searching for a forum I've seen linked here from time to time - it's a russian domain, as I recall, although the forum is in English. But my quick search only turned up this, which looks like a nice large forum: http://www.cnczone.com/forums/. Although I can't say anything about it, except it answers my search for "cnc inkscape forum".

DRobs86
Posts: 12
Joined: Mon Jun 22, 2015 11:45 am

Re: GCode extension path to gcode unnecessary Z raises

Postby DRobs86 » Mon Jul 20, 2015 2:40 pm

Thanks very much for the replies. I am using the version that came with inkscape 0.91. To clarify a bit.... Normal cutting procedure is to split the total cut into a number of steps (if it's a sizeable cut). Lets get back to that circle that needs to be cut out of material 6 mm thick. If you want to cut it halfway through and then all the way through you would have one pass at 3mm deep then another 6mm deep. The machine starts by lifting the tool above the material surface so it can safely traverse to where it Wil enter the cut. It then plunges to the first cut depth and makes the circle. When you finish that first pass all it needs to do is plunge another 3mm and make another circular motion. What path to gcode generates tells the machine to lift to the safe traversing height and then plunge to the next step. This is on the same object. This gets to be a problem for me when I'm engraving text and set it to one almost full depth cut then one just a bit deeper as a finishing pass. The tool should stay down the entire time it's on the same letter (if it's a stroke font - usually). Instead it pops up between passes and ends up wastng time traversing z for no reason.

Good suggestion on the post processor. I had thought about making my own post processor but it does make sense to check to see what's out there.

Thanks for the advice and links.

User avatar
brynn
Posts: 10309
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: GCode extension path to gcode unnecessary Z raises

Postby brynn » Mon Jul 20, 2015 6:39 pm

Yes, that does sound like it's more related to how the code is written, than anything to do with how the image was drawn. I can't be any help with that.

But what about contacting the author of the extension? Maybe they would be glad to update it?

Good luck :D


Return to “Inkscape & Cutters/Plotters”