User avatar
terrance.w
Posts: 2
Joined: Wed Dec 28, 2016 11:59 pm
Contact: Send private message

OctoPrint "After Print Job is Cancelled" GCODE Script

Sun Jun 11, 2017 9:40 pm

Posting this here in the hopes that it will help someone in the future. I am using OctoPrint v1.3.4, with a Original Prusa i3 MK2 running FW 3.0.11. Hre is my problem; when I cancel a print from the OctoPrint interface, it just does a dead stop, and shuts things down. This has lead to a bunch of extra cleanup getting bad prints off of the print head. :/ I wanted OctoPrint to behave like a cancel from the LCD, here is what I came up with;

In OctoPrint go to Settings (the wrench), then GCODE Scripts. In the "After Print Job is Cancelled" area enter the following;

Code: Select all

G91; Set to Relative position G1 E-1 F300; retract the filament a bit before lifting the nozzle G0 Z15; move z axis up 15 G28 X; home X axis G1 Y150 F5000; move part out for inspection G90; Set to Absolute position M104 S0 ; turn off extruder heat M140 S0 ; turn off heated bed M106 S0 ; Turn off fan M18; Move Freely
Save and test. A "Cancel" from OctoPrint should behave much more like a cancel form the LCD.

Hope this helps,
-Woody.

Bytor
Posts: 14
Joined: Thu Mar 30, 2017 11:53 am
Contact: Send private message

Re: OctoPrint "After Print Job is Cancelled" GCODE Script

Fri Jun 16, 2017 1:19 am

Thanks for the code.

I gave it a try and it works great so far. Much better than the standard cancel action of Octopi.
3D printing newbie - wanting to learn :D

- 1st "printer" TIKO 3D
- 2nd PRUSA i3 MK2S

carsten.w2
Posts: 134
Joined: Wed Nov 02, 2016 5:45 pm
Contact: Send private message

Re: OctoPrint "After Print Job is Cancelled" GCODE Script

Sun Jun 25, 2017 10:41 am

I will try it also.

One thing: the GCode Reprap Wiki says that Marlin (based) FWs should call M84 instead of M18?

Carsten

Return to “Software”

Who is online

Users browsing this forum: No registered users and 3 guests