Page 1 of 1

G code help needed...

Posted: Fri Feb 21, 2014 8:34 pm
by DavidF
Ok so I have been dooing good with printing and really havent hit any snags, that is until today... I was printing a part when suddenly the x carriage crashed into the bed :shock: I have never seen this happen before so I started thinking all kinds of things like the driver dropping out from ove heating or what not. So I changed the layer height from .1 mm to .2 mm and tried it again....Same thing!! I tracked the problem down to layer 25 by looking at it in cura layer by layer and sure enough it shows that there is a move way way off for no known reason. Now rather than trying to figure out a bug in the slicer program I would just like to edit the g code to correct it. But im not real sure what im looking at. With a little time Im sure I can figure it out on my own (deleting the layer comes to mind :evil: ) But I do need to learn how to do this...... Im also throwing this out there for others to learn from so they dont go chaseing ghosts thinking that there is a problem with the printer itself...
MOLD.gco
(732.78 KiB) Downloaded 326 times

Re: G code help needed...

Posted: Fri Feb 21, 2014 8:53 pm
by DavidF
I guess what I am looking for is someone to point out the line number that the error is in, Im just not seeing it in the g code.....

Re: G code help needed...

Posted: Fri Feb 21, 2014 8:55 pm
by mhackney
Ok, this is odd. I don't see a crash into the bed but at the end of layer 24 I see:

Code: Select all

M83
G1 E-5 F6000
G1 X190 Y190 F9000
G1 Z15 F300
M0
G1 E5 F6000
G1 E-5 F6000
G1 X60.12 Y0.22 F9000
G1 E5 F6000
G1 F9000
M82
and then it continues at layer 25 at z=5.1 (I may be off by a layer or so but this corresponds with where you saw the problem.

This code puts the extruder into relative mode and reverses 5 mm. Then it moves to X190 Y190 fast and then to Z=15 or UP from where the layer was printing. I have no idea what its doing! Then it extrudes and retracts 5mm quickly and travels to X60.12 Y0.22. Finally it extrudes 5mm and puts the extruder into absolute mode.

Is there some odd geometry at this layer? It's odd that Cura would generate code like this for no reason.

But, it looks like you could just remove this entire block from M83 to M82 (inclusive) and things should be fine since the next move is to position to the next layer (z=5.1) to print.

Re: G code help needed...

Posted: Fri Feb 21, 2014 9:20 pm
by DavidF
that is where I think it starts filling in the bottom cavity of the mold, the walls in that area go to a 2' draft....interesting.....well now I know why i didnt see it in layer 25.... Thanks!!! Now Im going to go and have a closer look....

Re: G code help needed...

Posted: Fri Feb 21, 2014 9:22 pm
by mhackney
Yes, I ran the code through a simulator and that is where the cavity begins. This is the simulator - free and on the web: http://gcode.ws

Re: G code help needed...

Posted: Fri Feb 21, 2014 9:24 pm
by mhackney
Is it possible that you have an artifact in the STL file?

Re: G code help needed...

Posted: Fri Feb 21, 2014 9:42 pm
by DavidF
could be, maybe I should run it thru netfabb and check for errors???

Re: G code help needed...

Posted: Fri Feb 21, 2014 9:44 pm
by mhackney
Wouldn't hurt. Something must be strange in the source file.

Re: G code help needed...

Posted: Fri Feb 21, 2014 9:52 pm
by bubbasnow
how did you make the stl?

Re: G code help needed...

Posted: Fri Feb 21, 2014 10:03 pm
by DavidF
bubbasnow wrote:how did you make the stl?
Cad modeled it in alibre, then exported it....

dropped it in net fabb, no errors, tried repair, same code....

Re: G code help needed...

Posted: Fri Feb 21, 2014 10:05 pm
by DavidF
re printing now with the block removed... fingers crossed.... funny thing is in the code it stated ( Type; custom ) dont think I have seen that before... but then again I havent been looking.....

Re: G code help needed...

Posted: Fri Feb 21, 2014 10:06 pm
by mhackney
Try rotating it say 30° and slicing and see if this artifact occurs.

Re: G code help needed...

Posted: Fri Feb 21, 2014 10:12 pm
by DavidF
mhackney wrote:Try rotating it say 30° and slicing and see if this artifact occurs.

Yep, still there.....

Re: G code help needed...

Posted: Fri Feb 21, 2014 10:34 pm
by DavidF

Re: G code help needed...

Posted: Fri Feb 21, 2014 11:31 pm
by DavidF
Made it past the bad spot, Thanks MHackney..... now I will be able to decifer g code a little better and maybe be able to find the errors myself...well i hope any ways... :D

Re: G code help needed...

Posted: Sat Feb 22, 2014 6:05 pm
by mhackney
Nice looking part! It's really bugging me though why Cura put that in the code. You should post that section on the Cura forum (there must be a Cura forum!)

cheers,
Michael

Re: G code help needed...

Posted: Tue Mar 11, 2014 11:59 pm
by DavidF
mhackney wrote:Nice looking part! It's really bugging me though why Cura put that in the code. You should post that section on the Cura forum (there must be a Cura forum!)

cheers,
Michael

Well I figured it out. It was a pause at height plug in that was causing the problem, got me on a few other prints when I wasnt looking for that line of code :oops: I finally got tired of it and deleted the file plug in :lol: back to running great and worry free again. Im not real computer savy so this is just what worked for me....

Re: G code help needed...

Posted: Wed Mar 12, 2014 8:20 am
by mhackney
Plug-ins are the bane of software companies. On one hand you want to provide the flexibility to allow 3rd party plug-ins, on the other they give you bad press when the plug-in fails.

Re: G code help needed...

Posted: Fri Mar 14, 2014 6:12 pm
by MSURunner
mhackney wrote:Plug-ins are the bane of software companies. On one hand you want to provide the flexibility to allow 3rd party plug-ins, on the other they give you bad press when the plug-in fails.

That could also be related to Cura being centered around Marlin as opposed to Repetier.... I've used the pause at height on the Ultimaker without problems, but haven't tried it on the Rostock. I did try to utilize the pause feature for a little while on filament changing with Steve's Extruder and haven't touched it in a while because the coding worked differently in Repetier than Marlin...