Skip to content

Instantly share code, notes, and snippets.

@foosel foosel/afterPrintPaused Secret
Last active Feb 19, 2019

Embed
What would you like to do?
pause/resume scripts for OctoPrint 1.3.0
{% if pause_position.x is not none %}
; relative XYZE
G91
M83
; retract filament, move Z slightly upwards
G1 Z+5 E-5 F4500
; absolute XYZE
M82
G90
; move to a safe rest position, adjust as necessary
G1 X0 Y0
{% endif %}
{% if pause_position.x is not none %}
; relative extruder
M83
; prime nozzle
G1 E-5 F4500
G1 E5 F4500
G1 E5 F4500
; absolute E
M82
; absolute XYZ
G90
; reset E
G92 E{{ pause_position.e }}
; move back to pause position XYZ
G1 X{{ pause_position.x }} Y{{ pause_position.y }} Z{{ pause_position.z }} F4500
; reset to feed rate before pause if available
{% if pause_position.f is not none %}G1 F{{ pause_position.f }}{% endif %}
{% endif %}
@thomasdunn

This comment has been minimized.

Copy link

commented Jan 4, 2018

Awesome, thank you.

@nandinho84

This comment has been minimized.

Copy link

commented Jan 18, 2018

Hi! I've read somewhere that the pause_temperature has been implemented, but I've searched and I couldn't find any examples like the ones you've posted above. Could you please tell if this resume script is good to resume the temperature of the bed and the extruder to the previous temperature before pause the print?:

{% if pause_temperature.0 is not none %}
; wait for bed to reach the previous temperature
M190 S {{ pause_temperature.b }}
; wait for extruder to reach the previous temperature
M109 S{{ pause_temperature.0 }}

@echowhisky

This comment has been minimized.

Copy link

commented Jul 21, 2018

Was having lots of problems getting this to work -- the extruder would not extrude after resume. I spent an entire evening on print fails until I found the comment in this thread by @c3r63ru5 . There is an issue in using the commands above with GCODE produced by Slic3r because it uses relative, not absolute extruder settings. I changed the resume code to the following and it worked perfectly.

{% if pause_position.x is not none %}
; relative extruder
M83
; prime nozzle
G1 E-5 F4500
G1 E5 F4500
G1 E5 F4500
; absolute XYZ
G90
; move back to pause position XYZ
G1 X{{ pause_position.x }} Y{{ pause_position.y }} Z{{ pause_position.z }} F4500
; reset to feed rate before pause if available
{% if pause_position.f is not none %}G1 F{{ pause_position.f }}{% endif %}
{% endif %}
@themaire

This comment has been minimized.

Copy link

commented Jul 31, 2018

Thanks you for everyone.

@marcodagostino

This comment has been minimized.

Copy link

commented Sep 11, 2018

I've followed the entire process and sensor works fine when filament runs out but when I change the filament and press knob for resume print process hotend comes back to correct position for a second then quickly return to change filament position and extruder retract filament again... substantially I'm in a change filament loop!!! Why this happens??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.