Welcome! Log In Create A New Profile

Advanced

Cura End Gcode

Posted by charybdis9 
Cura End Gcode
April 07, 2016 04:25PM
I have a HICTOP i3 that came with Cura as the slicing program. I have been trying to edit the end gcode so that when the print finishes the head will move to the back right corner of the build plate bringing the print to the front of the printer. So far I have not had any success. My current end code is as follows:


M104 S0 ;extruder heater off
M140 S0 ;heated bed heater off (if you have it)
G91 ;relative positioning
G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure
G1 Z+0.5 E-5 X-20 Y-20 F{travel_speed} ;move Z up a bit and retract filament even more
G28 X160 Y220 ;move X/Y to min endstops, so the head is out of the way
M84 ;steppers off
G90 ;absolute positioning
;{profile_string}

The bold text is what I changed to try and accomplish what I was looking for. However, every time it finishes a print it moves back to 0,0. Am I missing something? Or is it possible for the board to be overriding what I am trying to do? Any help would be greatly appreciated.

Thanks!
Re: Cura End Gcode
April 07, 2016 04:44PM
have you tried putting a minus before the numbers ?

Edited 2 time(s). Last edit at 04/07/2016 04:54PM by wampablo.
Re: Cura End Gcode
April 08, 2016 05:28PM
I did some reading on the Gcodes and it looks like my issue had to do with G28 being used to return to origin. So even though I changed the X and Y coordinates in that line it didn't acknowledge that. I switched it to a G1 X160 Y220 and it seemed to be smooth sailing.
Re: Cura End Gcode
April 11, 2016 11:35AM
You have to put absolute positioning before your homing command. G90 before your G1 X.... Y..... The way you have it now, you are telling it to move 220 mm MORE in the Y direction. And it says "Say what???"

Edited 2 time(s). Last edit at 04/11/2016 11:46AM by tjnamtiw.


Folger Tech 2020 i3 and FT-5 as well as modified JGAurora A5 with direct drive E3D/Titan. All running the BLTOUCH.
Great kits. Having fun and running the heck out of them.
Running Marlin 1.1.0 RC8 on the i3 and FT5. Custom firmware on A5.
Folger Tech Wiki board >[folgertech.wikia.com]
Re: Cura End Gcode
April 11, 2016 02:13PM
It looks like you already have the problem fixed, but just for good measure i wanted to explain G-code a little better. G-code is basically a programming language, so it has certain commands and certain syntax it expects. The syntax is {G-code} {arguments}; . Some G codes need different arguments, some use the same arguments but do a different thing.

When printing the most common G-code is G1, G1 X## Y## F##. That simply means "go in a straight line to (X,Y) at F speed". Another common one is G0 X## Y## , this means "get to (X,Y) as quickly as possible". these commands are used for slightly different goals, G1 is used for printing, G0 is used for travel moves. G28 is a specific use of these commands, it just means "Go back to home position", the only arguments that it can take is the feed rate F. there are lots of other commands, G2 and G3 tells the machine to make a circle for example (little used in the reprap world, very common in the CNC world).

There are also commands that change the way that your machine will interpret commands, that is what tjnamtiw was saying. G90 means "use absolute positioning" or more simplified "when i say G0 X## Y##, move to the point (X,Y)". G91 means "use relative positioning." or more simplified "when i say G0 X## Y##, go X units MORE in the X direction, and go Y units MORE in the Y direction".

Edited 1 time(s). Last edit at 04/11/2016 02:13PM by AudaciousTuddle.
Sorry, only registered users may post in this forum.

Click here to login