Print nozzle gets stuck after print cancellation

When cancel print OctoPrint just stops. Hot nozzle is still touching the printed material and as it cools it bonds to printed object.

Is this a common known issue?

On my Prusa machine firmware on cancel comman stops extrusion and all motors but then lifts Z axis so it is not touching the print object.

How can I enable same behaviour with OctoPrint?

When you cancel a print in OctoPrint, it just stops sending data to the printer. So this is no issue. You may fill in some code into the OctoPrint Settings -> GCODE Scrips:

This is what I have for my Vivedino T-Rex 3:

; Lift print head a bit
G91 ; relative pos
G1 Z5 ; Move print head up
G90 ; absolute pos
G28 X  ; Home X axis
;G4 ; wait
;M104 S0 ; turn off temperature
;M140 S0 ; turn off heatbed
M107 P0 ; turn off fan
M107 P1 ; turn off fan
;G1 X0; home X axis
M84 ; disable motors

I leave the heating on, because when I cancel a print, I soon start a new one.
But you can un-remark the lines to turn heating off.

1 Like

@Ewald_Ikemann this is great, thanks!

I tried using G1 Z30 and that works great, but I also tried a bit smarter line that Prusa Slicer uses:

{if layer_z < max_print_height}G1 Z{z_offset+min(layer_z+30, max_print_height)}{endif} ; Move print head up

That for Prusa Slicer causes print head to go up only if there is space to do so, but now same line added to OctoPrint causes print head of my Prusa machine to go down! :frowning:

Any idea why it goes in opposite direction?

The scripts in OctoPrint work a bit different than in PrusaSlicer:
https://docs.octoprint.org/en/master/features/gcode_scripts.html