Modifying the Ending G-code script

Have questions or comments about Simplify3D, Slic3r, Cura, Reptier, etc? Or wondering about which CAD software to use...discuss it here...
Post Reply
User avatar
Jules
Posts: 3144
Joined: Wed Jan 21, 2015 1:36 am

Modifying the Ending G-code script

Post by Jules » Fri Mar 06, 2015 5:30 pm

I know there's got to be some way to do this....

In the scripts section of S3D there's a section for Ending G-Code - I'd like to modify that so that the bed doesn't slam down so fast at the end of a print. I've either got the Z-shaft too well greased or something isn't catching that is supposed to - mine comes close to dropping in free-fall.

I'm using a PLA spring under the bed, but it still whacks down hard enough to "kiss" the motor underneath.

Current default Ending script looks like this:

M104 S0 ; turn off extruder
M140 S0 ; turn off bed
G91 ; relative mode
G1 Z10 ; lift 10mm
G90 ; absolute mode
G28 X0 ; home X axis
M84 ; disable motors

While using the spring, the Z axis settings run from 0 at the top (Home) to about 195 at the bottom instead of the original 200. (Or at least that is what it is now - the spring is being compressed a bit.) Ideally I'd like to stop the downward Z axis movement at about 190 mm from the top Home position. Or at least slow it down significantly while it travels down - I'd rather have it travel down under control.

Would this work?

M104 S0 ; turn off extruder
M140 S0 ; turn off bed
G91 ; relative mode
G1 Z10 ; lift 10mm
G90 ; absolute mode
G1 Z190; (drop Z axis to just above spring?)
G28 X0 ; home X axis
M84 ; disable motors

Or should I just eliminate that M84 command?

Is there a quick and dirty Reference Guide somewhere for G-code that says what each of those codes stands for?

Thanks gentlemen! :)
Last edited by Jules on Fri Mar 06, 2015 6:12 pm, edited 1 time in total.

User avatar
sthone
Posts: 892
Joined: Tue Jul 08, 2014 8:25 pm
Location: Connecticut
Contact:

Re: Modifying the Ending G-code script

Post by sthone » Fri Mar 06, 2015 5:46 pm

This Thread might help for the bed drop part.

Try this for G-Code Reference


-Steve
Last edited by sthone on Fri Mar 06, 2015 5:53 pm, edited 2 times in total.
____________________________________________________
See my projects at https://www.theneverendingprojectslist.com

User avatar
Jules
Posts: 3144
Joined: Wed Jan 21, 2015 1:36 am

Re: Modifying the Ending G-code script

Post by Jules » Fri Mar 06, 2015 5:51 pm

Yes, it does! Thanks Steve! :D

User avatar
sthone
Posts: 892
Joined: Tue Jul 08, 2014 8:25 pm
Location: Connecticut
Contact:

Re: Modifying the Ending G-code script

Post by sthone » Fri Mar 06, 2015 5:52 pm

I just edited that post for the g-Code part after you replied.

-Steve
____________________________________________________
See my projects at https://www.theneverendingprojectslist.com

User avatar
Jules
Posts: 3144
Joined: Wed Jan 21, 2015 1:36 am

Re: Modifying the Ending G-code script

Post by Jules » Fri Mar 06, 2015 6:09 pm

Huh! Damn good thing I asked! That G28 code would have crushed whatever had been printed! (Will fix in the original post, in case someone else tries to use it down the road.)

I converted that reference into a PDF that I could print out Steve - thanks a bunch! It's going to come in very handy! :D

Post Reply