Created
June 2, 2021 15:55
-
-
Save NameOfTheDragon/d3099dc698cfddd775d59ac23637ab52 to your computer and use it in GitHub Desktop.
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
# Macros for pausing, resuming and changing filament mid-print. | |
[gcode_macro M600] | |
gcode: | |
CHANGE_FILAMENT | |
[gcode_macro M601] | |
gcode: | |
CHANGE_FILAMENT | |
[gcode_macro CHANGE_FILAMENT] | |
default_parameter_RESUME_SPEED: 1200 | |
gcode: | |
M117 Change Filament | |
PAUSE | |
M117 | |
[gcode_macro PAUSE] | |
rename_existing: BASE_PAUSE | |
default_parameter_E: 1.7 | |
gcode: | |
LED_PAUSED | |
{% set x_park = printer.toolhead.axis_minimum.x|float + 5.0 %} | |
{% set y_park = printer.toolhead.axis_maximum.y|float - 15.0 %} | |
{% set max_z = printer.toolhead.axis_maximum.z|float %} | |
{% set act_z = printer.toolhead.position.z|float %} | |
{% if act_z < (max_z - 40) %} | |
{% set z_safe = 40 %} | |
{% else %} | |
{% set z_safe = max_z - act_z %} | |
{% endif %} | |
SAVE_GCODE_STATE NAME=PAUSE_state | |
BASE_PAUSE | |
G91 | |
G1 E-{E} F2100 | |
G1 Z{z_safe} F900 | |
G90 | |
G0 X{x_park} Y{y_park} F6000 | |
G91 | |
[gcode_macro RESUME] | |
rename_existing: BASE_RESUME | |
default_parameter_E: 1.7 | |
gcode: | |
LED_PRINTING | |
G91 | |
G1 E{E} F2100 | |
RESTORE_GCODE_STATE NAME=PAUSE_state | |
BASE_RESUME |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment