When printing from virtual SD, rusume does not work

Basic Information:

Printer Model: AM8
MCU / Printerboard: skr1.4, a8 board, RPI4
klippy.log

Fill out above information and in all cases attach your klippy.log file. Pasting your printer.cfg is not needed

Describe your issue:

klippy(3).log (3.4 MB)

Currently, I am modifying the macro to use the MMU filament change function.
When actually printing, if a macro including PAUSE and RESUME is executed, an SD busy error always occurs in Resume.
If you directly execute the macro while not printing, PAUSE and RESUME work normally.

I’ve tried several things to figure out what the problem is and how to fix it, but to no avail. If you know a solution, please let me know.

This is the macro we are currently testing.

Blockquote
[gcode_macro TEST_TEST]
gcode:
#{% if printer.homed_axes != ‘XYZ’ %}
# G28 #Home All Axes
#{% endif %}
#RESUME
M117 Change Tool T0
M118 Change Tool T0
{% if printer.pause_resume.is_paused == false %}
M118 PAUSE : {printer.pause_resume.is_paused}, No Pause
clear_pause
PAUSE
{% endif %}
G4 p10000
M118 UT, LT
#M118 PAUSE : {printer.pause_resume.is_paused} Check
#{% if printer.pause_resume.is_paused == true %}
#M118 PAUSE : {printer.pause_resume.is_paused}, Restart
#RESUME
#{% endif %}
test_resume

Blockquote
[gcode_macro TEST_resume]
gcode:
M118 PAUSE : {printer.pause_resume.is_paused} Check resume
{% if printer.pause_resume.is_paused == true %}
M118 PAUSE : {printer.pause_resume.is_paused}, Restart
resume
{% endif %}
test_status

Blockquote
[gcode_macro PARK]
gcode:
{% set z_max = printer.toolhead.axis_maximum.z %}
{% set z_pos = printer.toolhead.position.z %}
{% set y_max = printer.toolhead.axis_maximum.y %}
{% set y_min = printer.toolhead.axis_minimum.y %}
{% set x_min = printer.toolhead.axis_minimum.x %}
{% set travel_speed = printer.toolhead.max_velocity * 0.7 * 15 %}
{% set z_travel_speed = printer.configfile.settings.printer.max_z_velocity * 60 %}
{% set park_height = 50 %}
## This sets your park position, it should be safe, BUT test carfully
## It uses the data from printer.toolhead which is the live data on where the toolhead can be moved
## If this gets it wrong, check your config file for min/max positions is correct
{% set x = params.X|default(x_min + 5) %} #edit to your park position
{% set y = params.Y|default(y_min + 5) %} #edit to your park position
{% set z = params.Z|default(park_height)|float %} #edit to your park position
{% if z_pos > (z_max ) %}
M117 Z {z_pos} Cant raise
#UPDATE_DELAYED_GCODE ID=clear_display DURATION=10
{% elif z_pos > park_height + 0.04 %}
#M117 Z {z_pos} goto { (( z_max - 10 - z_pos) * 0.5 ) + z_pos }
#UPDATE_DELAYED_GCODE ID=clear_display DURATION=10
G1 Z { (( z_max - 10 - z_pos) * 0.5 ) + z_pos } F600
{% elif z_pos < park_height -0.04 %}
#M117 Z {z_pos} goto {park_height}
#UPDATE_DELAYED_GCODE ID=clear_display DURATION=10
G1 Z {z} F{z_travel_speed}
{% else %}
M117 I think we are already at park height
#UPDATE_DELAYED_GCODE ID=clear_display DURATION=10
{% endif %}
G1 Y {y} X {x} F{travel_speed}

Blockquote
[gcode_macro PRESENT]
gcode:
{% set my_y = printer.toolhead.axis_maximum.y - 5 %}
PARK Y={my_y}

Blockquote
[gcode_macro PAUSE]
rename_existing: BASE_PAUSE
gcode:
##### set defaults #####
#{% set svv = printer.save_variables.variables %}
#{% set e = svv.filament_pause_retraction|float %} #comment out this line if you want a standalone macro
{% set e = 3|float %} #and uncomment this one
{% set x = params.X|default(printer.toolhead.axis_minimum.x + 2 ) %} #edit to your park position
{% set y = params.Y|default(printer.toolhead.axis_minimum.y + 2) %} #edit to your park position
##### end of definitions #####
#SAVE_GCODE_STATE NAME=PAUSE_state
clear_pause
BASE_PAUSE
{% if printer.extruder.can_extrude %}
G91
G1 E-{e} F2100 #negative for retraction
G90
{% endif %}
PARK X={x} Y={y}

Blockquote
[gcode_macro RESUME]
rename_existing: BASE_RESUME
gcode:
##### set defaults #####
#{% set svv = printer.save_variables.variables %}
#{% set e = svv.filament_pause_retraction|float %} #comment out this line if you want a standalone macro
{% set e = 3|float %} #and uncomment this one
{% if printer.extruder.can_extrude %}
G91
G1 E{e} F2100 #we really want a positive extrude here
G90
{% endif %}
#RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
BASE_RESUME

Blockquote
M73 P0 R69
M73 Q0 S70
M107
;TYPE:Custom3
test_test
M140 S60 ;set bed temp
G4 P60000
M104 S230 ;set extruder temp
M190 S60 ; wait for designated temp
G28 ; home axis
M109 S230 ; wait for designated temp
M104 S230 ;set extruder temp
M109 S230 ; wait for designated temp
G21
M82
M107
M117 Printing…
G21 ; set units to millimeters
G90 ; use absolute coordinates
M82 ; use absolute distances for extrusion

This is tested by slicing a 202020 calibration cube and modifying the G-code.

I don’t see a resume anywhere in your test_resume macro.

Configured to call test_resume macro at the end of test_test macro.

Can’t the path and resume be applied together in one macro?

You configured it to operate using save_gcode_state and restore_gcode_state. I think we can modify it in detail now.

Hi, how did you solve it? I have the same problem. SD BUSY when I resume printing.

This thread is old and dead (solved) :wink:
Why don’t you start a new one in General Discussion? Please fill out the template.

Good luck, hcet14

3 Likes