Notifications
Clear all

OctoPrint Pause/Resume  

  RSS
Pivot
(@pivot)
Membre
OctoPrint Pause/Resume

Hi, I'm trying to add a filament runout sensor to my old Prusa i3 MK2 (fw 3.2.3, RAMBo13a) using OctoPrint where to connect the sensor. Before to buy the sensor and print needed components I have set gcode script in OctoPrint to verify that Pause and Resume print can work in the right way.

First attempt: using simple commands M601 and M602 ( https://blog.prusa3d.com/prusa-autumn-news-summary-2023-new-firmware-prusaslicer-mk3-5-info-and-more_86935/ ). They failed.

Second attempt: customize "After print job is paused" and "Before print job is resumed" scripts (see them below). I want to cool down the head as I am not always near the printer and I can see that the filament ends after some hours. It seems to work well: the head goes up and move to x=0, y=0 position and cool down. I can swap/insert the new filament, but after resume I have problem with extrusion: the filament does not come out. Positioning and temperatures are restored as before the pause.

Does anyone have any suggestions?

I have seen this thread: https://forum.prusa3d.com/forum/original-prusa-i3-mk2-s-others-archive/anyone-tried-the-new-pause-print-gcode-m601-m602/ , but it does not resolve my problems.

; ==================================
;  --- afterPrintPaused script ---
; ==================================
; (optional) disable stepper inactivity timeout - uncomment if you printer disables steppers during pause and supports this command
M18 S0

{% if pause_position.x is not none %}
; relative XYZ
G91
; relative E (extruder)
M83

; retract filament, move Z slightly upwards (5mm)
G1 Z+5 E-5 F4500

; absolute XYZ
G90

; move to a safe rest position, adjust as necessary
G1 X0 Y0
{% endif %}

; restore filament extrusion
G1 E5 F4500

; absolute E (extruder)
M82

;disable all heaters
{% snippet 'disable_hotends' %}
; Does not turn off bed
; {% snippet 'disable_bed' %}
;disable fan
M106 S0

; beeps to notify the event
M300 S440 P200
M300 S660 P250
M300 S880 P300
; Set LCD display message
M117 Print Paused

 

; ==================================
; --- beforePrintResumed script ---
; ==================================
; beeps to notify the event
M300 S880 P300
M300 S660 P250
M300 S440 P200

{% if pause_position.x is not none %}

; =============================================================
; restore temperatures (to do before extrusion)
{% for tool in range(printer_profile.extruder.count) %}
    {% if pause_temperature[tool] and pause_temperature[tool]['target'] is not none %}
        {% if tool == 0 and printer_profile.extruder.count == 1 %}
            M109 T{{ tool }} S{{ pause_temperature[tool]['target'] }}
        {% else %}
            M109 S{{ pause_temperature[tool]['target'] }}
        {% endif %}
    {% else %}
        {% if tool == 0 and printer_profile.extruder.count == 1 %}
            M104 T{{ tool }} S0
        {% else %}
            M104 S0
        {% endif %}
    {% endif %}
{% endfor %}

{% if printer_profile.heatedBed %}
    {% if pause_temperature['b'] and pause_temperature['b']['target'] is not none %}
        M190 S{{ pause_temperature['b']['target'] }}
    {% else %}
        M140 S0
    {% endif %}
{% endif %}
; =============================================================

; relative XYZ
G91
; relative E (extruder)
M83

; prime nozzle
G1 E-5 F4500
G1 E5 F4500
G1 E5 F4500

; absolute E
M82
; absolute XYZ
G90

; restore 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 %}

; restore fanspeed
{% if pause_fanspeed is not none %}M106 S{{ pause_fanspeed }}{% endif %}
{% endif %}

; Set LCD display message
M117 Print resumed
Ce sujet a été modifié il y a 5 days 2 fois par Pivot
Publié : 14/09/2025 4:58 pm
Pivot
(@pivot)
Membre
Topic starter answered:
RE: OctoPrint Pause/Resume

I just want to add that M601 and M602 commands was added with firmware version 3.0.11: https://github.com/prusa3d/Prusa-Firmware/releases/tag/v3.0.11-RC1

Improved pause print:

Pause print procedure is now suitable for long pauses. New pause print procedure contains seting nozzle target temperature to zero, moving extruder to pause print position and turning off print fan. When nozzle cools down nozzle fan is also turned off and printer remains silent during pause. Heatbed remains heated during pause print to maintain good attachement between printed object and heatbed.In pause position heatbed with printed object is moved foward to make printed object accessible.When print is resumed, previous print settings (fan speed and feemultiply, nozzle target temperature) are restored. Time when the printer is paused is not counted to print time statistics.For remote control with host software devices, it is possible to pause and resume print with dedicated gcodes:

  • M601 - pause print
  • M602 - resume print
Publié : 14/09/2025 5:08 pm
Partager :