Acting like finish print when Cancelling a job

What is the problem?

WRITE HERE
Hello, I am very newto 3D printing, Rasoberry pi and Octopi. So far, this is more fun than I could have evr imagine :slight_smile: I have a little issues that I do not know how to solve after reading everything I could find online. My knoledge is also limited in terms of coding, gcode, etc. After I cancel a job, I would like the nozzle to act just like when a printing is finished. I would like it to lift, get out of the way to the side and slide the bed forward (just like when a print is finished. What would be the code to enter in the GCODE scripts in "After print job is cancelled".

At the moment this is what is written:

; disable motors
M84

;disable all heaters
{% snippet 'disable_hotends' %}
{% snippet 'disable_bed' %}
;disable fan
M106 S0

What did you already try to solve it?

WRITE HERE
Copy paste some codes other people proposed in forums. But it did not work, I am not sure if it has to be specific for the printer I have.

Have you tried running in safe mode?

WRITE HERE
I do not know what that is?

Did running in safe mode solve the problem?

WRITE HERE
I have not tried that. Beside this little change, everything else runs perfectly

Systeminfo Bundle

You can download this in OctoPrint's System Information dialog ... no bundle, no support!)

WRITE HERE

Additional information about your setup

OctoPrint version, OctoPi version, printer, firmware, browser, operating system, ... as much data as possible
Octoprint version: Version 1.9.3
Octopi version: Build 2023.07.20.144556 with "camera-streamer", based on OctoPi 1.0.0, running on Raspberry Pi 4 Model B Rev 1.5
Printer: Ender 3 V2 Neo

WRITE HERE

You didn't mention what slicer you are using but most slicers define "Start gcode" and "End gcode" and it sounds like you want to copy some of the "End gcode" into the "After print job is cancelled".

If you need help deciding what to include, show us what you have and we will try and help. Please use the </> icon above to surround any code you insert to avoid any markdown interpretation.

1 Like

Hello :slight_smile:

Thank you for your reply. I appreciate your help very much. I am using Cura 5.4.
I found here the end gcode that cura uses:

G91 ;Relative positioning
G1 E-2 F2700 ;Retract a bit
G1 E-2 Z0.2 F2400 ;Retract and raise Z
G1 X5 Y5 F3000 ;Wipe out
G1 Z10 ;Raise Z more
G90 ;Absolute positioning

G1 X0 Y{machine_depth} ;Present print
M106 S0 ;Turn-off fan
M104 S0 ;Turn-off hotend
M140 S0 ;Turn-off bed

M84 X Y E ;Disable all steppers but Z

Then use this as cancel gcode :slight_smile:

G91 ;Relative positioning
G1 E-2 F2700 ;Retract a bit
G1 E-2 Z0.2 F2400 ;Retract and raise Z
G1 X5 Y5 F3000 ;Wipe out
G1 Z10 ;Raise Z more
G90 ;Absolute positioning

G1 X0 Y220 ;Present print
M106 S0 ;Turn-off fan
M104 S0 ;Turn-off hotend
M140 S0 ;Turn-off bed

M84 X Y E ;Disable all steppers but Z

IT WORKED!!!! Thank you very much for your help :slight_smile:

1 Like

np :slight_smile:
happy printing :tentacle:

I've thought about doing this before, but came to the conclusion that the cancel button is there as a stop if something is wrong, so after pressing, it cools down and nothing further happens.

I'm thinking along the lines of if something got stuck, you wouldn't want it to raise and move after you've cancelled.

It would be good if there was an alternative to the "cancel" button by having two distinct buttons, "Stop" and "Abort Print".

Depends on what you want to achieve.

I distinguish between Cancel and Emergency Stop.

I use Cancel when I note a false setting in the slicer or the model.
So I abort the print, remove the parts. and start anew.

You have:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.