# Need END GCODE that doesnt send the printer head straight up

**URL:** <https://forum.lulzbot.com/t/need-end-gcode-that-doesnt-send-the-printer-head-straight-up/3989>\
**Category:** LulzBot TAZ\
**Created:** [September 14, 2016, 11:54pm UTC](https://forum.lulzbot.com/t/need-end-gcode-that-doesnt-send-the-printer-head-straight-up/3989 "2016-09-14T23:54:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AverageVeganDude](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.lulzbot.com/averagevegandude/32/9334_2.png) [@AverageVeganDude](https://forum.lulzbot.com/u/AverageVeganDude)\
**Post date:** [September 14, 2016, 11:54pm UTC](https://forum.lulzbot.com/t/need-end-gcode-that-doesnt-send-the-printer-head-straight-up/3989/1 "2016-09-14T23:54:55Z")

</div>

I am having difficulty still with the ending code for the Cura nGen profile. It seems to shoot the print head straight up and as I have my spool mounted on top, this is no good.

Anyone have a good ending code that just lifts the head slightly up after the print is done and moves the build plate forward?

Thanks,  
Chris

---

<div class="post-metadata">

**Author:** ![nopick](https://avatars.discourse-cdn.com/v4/letter/n/7bcc69/32.png) [@nopick](https://forum.lulzbot.com/u/nopick)\
**Post date:** [September 15, 2016, 12:37pm UTC](https://forum.lulzbot.com/t/need-end-gcode-that-doesnt-send-the-printer-head-straight-up/3989/2 "2016-09-15T12:37:46Z")

</div>

This is what I use for my Taz 5.

M400  
M104 S0 ; hotend off  
M140 S0 ; heated bed heater off (if you have it)  
M107 ; fans off  
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 F3000 ; move Z up a bit and retract filament even more  
G90 ; absolute positioning  
G1 X100 Y250 ; move to cooling position  
M84 ; steppers off  
G90 ; absolute positioning
