Welcome! Log In Create A New Profile

Advanced

Cura end code, what am I doing wrong?

Posted by HugoW 
Cura end code, what am I doing wrong?
January 09, 2019 03:47PM
Hi,

up to now, I just had the printer home X and Y when done, but I noticed the print head marking the finished print and I had some ooze upon start-up, so I changed some things:

Start g-code:
G1 Z5.0 F300        ;  Move the platform down 5mm
G28 X0 Y0              ;  Home XY
G1 X50 Y50 F6000   ;  Move to safe Z-home location
G28 Z0                   ;  Home Z
G29                       ;  Auto bed leveling
G1 E3 F220             ;  Extract 3 mm that was retracted in End Gcode
G92 E0                   ;  Set E back to zero to begin print


End g-code:
M104 S0                     ;  Set hotend to 0
M140 S0                     ;  Set heated bed to 0
G91 E-3 F220              ;  Retract 3mm
G91 Z5 F300               ;  Raise head 5mm
G90 X10 Y10 F6000     ;  Go to (almost) home
M84                           ;  Shut down machine


So the hotends heats up, the fillament is retracted 3mm when ending the previous print (should be...), we home and level, the missing 3mm is extracted, E is zero-ed and on we go with the print. This all works.

Now we're done printing, all heated elements are shut down, that works, but then the machine freezes. Now I know it can handle G91 moves, as it does so in the start code. Why wouldn't it continue?

Cheers,

Hugo

Edited 3 time(s). Last edit at 01/09/2019 03:51PM by HugoW.
Re: Cura end code, what am I doing wrong?
January 09, 2019 06:18PM
I wouldn't use G90/G91 that way myself at the end.

G90 should be used to set absolute positioning. G91 for relative positioning.

To do what (it seems) you want:
M104 S0 ; Turn off hotend
M140 S0 ; turn off heated bed
G91 ; set relative positioning
G1 E-3 ; retract 3mm
G90; set absolute positioning
G1 X10 Y10 F6000 ; send print head close to origin.
M84 ; power down motors

Off the top of my head, anyway. I might change someof the options to the G1 commands.


MBot3D Printer
MakerBot clone Kit from Amazon
Added heated bed.

Leadscrew self-built printer (in progress)
Duet Wifi, Precision Piezo parts
Sorry, only registered users may post in this forum.

Click here to login