Created
February 11, 2023 21:06
-
-
Save bistory/629b596c5c49d6b01f5cf06ea2f2690f to your computer and use it in GitHub Desktop.
Macros for loading and unloading filament with Klipper
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[gcode_macro LOAD_FILAMENT] | |
gcode: | |
{% set speed = params.SPEED|default(300) %} | |
{% set max_velocity = printer.configfile.settings['extruder'].max_extrude_only_velocity %} | |
SAVE_GCODE_STATE NAME=load_state | |
M300 # beep | |
G91 | |
G92 E0 | |
G1 E350 F{max_velocity} # fast-load | |
G1 E25 F{speed} # purge | |
M300 | |
M300 | |
RESTORE_GCODE_STATE NAME=load_state | |
[gcode_macro UNLOAD_FILAMENT] | |
gcode: | |
{% set speed = params.SPEED|default(300) %} | |
{% set max_velocity = printer.configfile.settings['extruder'].max_extrude_only_velocity %} | |
SAVE_GCODE_STATE NAME=unload_state | |
G91 | |
M300 # beep | |
G92 E0 | |
G1 E25 F{speed} # purge | |
G1 E-420 F{max_velocity} # fast-unload | |
M300 | |
M300 | |
RESTORE_GCODE_STATE NAME=unload_state |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Pre-heat the nozzle...