During resume operation, it changes to the relative coordinates and moves to the stored position

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 (2).log (709.8 KB)

During resume operation, it changes to the relative coordinates and moves to the stored place

“!! SD BUSY” error resolved.

However, when operating the T0 filament replacement macro among macros, the coordinates change from absolute coordinates to relative coordinates during Resume operation. This causes errors beyond the bed size.

It is the same if you apply the G90 G-code just before Resume in the macro.

However, the test macro works fine again.

Isn’t RESTORE_GCODE_STATE an absolute coordinate during Resume operation?

This is the problematic macro.

Blockquote
[gcode_macro T0]
gcode:
{% if printer[“gcode_macro SELECT_TOOL”].color_selected|int != 0 %}
M117 Change Tool T0
M118 Change Tool T0
M118 T0 PAUSE : {printer.pause_resume.is_paused}
{% if printer.pause_resume.is_paused == false %}
M118 Pause(T0)
pause
UT
LT VALUE=0
M118 T0 PAUSE : {printer.pause_resume.is_paused} “pause Yes”
G90
RESUME
{% else %}
M118 Not Pause T0
UT
LT VALUE=0
M118 T0 PAUSE : {printer.pause_resume.is_paused} “not Pause”
G90
RESUME
{% endif %}
{% endif %}

Resume macro

Blockquote
[gcode_macro RESUME]
rename_existing: RESUME_BASE
#Variable_E: 0.5 #edit to your retract length
gcode:
{% if printer.extruder.temperature > 180 %}
G91
G1 E1 F2100
{% endif %}
G1 F6000
G90
#RESTORE_GCODE_STATE NAME=PAUSE_state #MOVE=1
RESUME_BASE

Of course:

There is a G91 command in your resume macro.

If you want to do a relative extruder motion (G1 E1 F2100), you have to use M83.

The if/endif block looks a bit mixed up: The set to relative mode is inside, the set to absolute mode is outside.

It may look like this:

[gcode_macro RESUME]
rename_existing: RESUME_BASE
#Variable_E: 0.5 #edit to your retract length
gcode:
{% if printer.extruder.temperature > 180 %}
G83 ; set extruder to relative mode
G1 E1 F2100
G1 F6000
G82 ; set extruder to absolute mode
{% endif %}
#RESTORE_GCODE_STATE NAME=PAUSE_state #MOVE=1
RESUME_BASE

Also, if you do switch tools, I recommend to work with relative extrusions only else sooner or later you will have a mess due to mixed up extruder lengths.

1 Like

I removed the move gcode from the other linked macros and it works fine.
This is not the problem, but the SD busy error occurs again. It’s hard because of this