klipper_switchwire/macros.cfg
2022-06-11 12:24:15 -07:00

118 lines
2.8 KiB
INI

[gcode_macro Show_off]
gcode:
G4 P10000
#LIGHTS_ON
G28
G4 P2000
#LIGHTS_OFF
[gcode_macro DISABLE_MOTORS]
gcode:
M18
[idle_timeout]
gcode:
TURN_OFF_HEATERS
DISABLE_MOTORS
#LIGHTS_OFF
[gcode_macro change_filament]
gcode:
{% set X = 55 %}
{% set Y = -15 %}
{% set Z = 75 %}
{% set UNLOAD_DIST = -100 %}
{% set LOAD_DIST = 150 %}
{% set extruderTemp = params.EXTRUDER_TEMP|default(230)|float %}
M104 S{extruderTemp} #set nozzle temperature
#Home if the toolhead doesn't know its position
{% if printer.toolhead.homed_axes != 'xyz' %}
G28
{% endif %}
G0 X{X} Y{Y} Z{Z} #move to area where you can easily load filament
M109 S{extruderTemp} #wait for nozzle temperature
M83 #relative positioning on extruder
G0 E15 F400 #extrude filament to get better blob on end
G0 E{UNLOAD_DIST} F1000 #unload filament
G4 P15000 #wait for filament change 30 seconds
RESPOND PREFIX= MSG="15 seconds left"
G4 P15000 #continue waiting
G92 E0 #reset extruder
M83 #relative positioning on extruder
G0 E{LOAD_DIST} F400 #load filament
G92 E0 #reset extruder
[gcode_macro clean_nozzle]
gcode:
# settings
{% set nozzle = {
'X' : 55, # X coordinate
'Y' : -15, # Y coordinate
'Z' : 150, # Z coordinate
'Temp' : params.EXTRUDER_TEMP|default(240)|float,
} %}
M104 S{nozzle.Temp} #set nozzle temperature
#Home if the toolhead doesn't know its position
{% if printer.toolhead.homed_axes != 'xyz' %}
G28
{% endif %}
G0 X{nozzle.X} Y{nozzle.Y} Z{nozzle.Z} #move to area where you can easily clean the nozzle
M109 S{nozzle.Temp} #wait for nozzle temperature
[gcode_macro CANCEL_PRINT]
rename_existing: BASE_CANCEL_PRINT
gcode:
M104 S0
M140 S0
M106 S0
G91 E-2
CLEAR_PAUSE
BASE_CANCEL_PRINT
SDCARD_RESET_FILE
M221 S100
BED_MESH_CLEAR
OFF_DISPLAY
[gcode_macro PAUSE]
rename_existing: BASE_PAUSE
gcode:
#Edit this#
{% set X = 230 %}
{% set Y = 200 %}
{% set Z = 30 %}
###########
SAVE_GCODE_STATE NAME=PAUSE_state
BASE_PAUSE
G91
G1 E-1.7 F2100
G1 Z{Z}
G90
G1 X{X} Y{Y} F6000
G91
[gcode_macro RESUME]
rename_existing: BASE_RESUME
gcode:
G91
G1 E1.7 F2100
G91
RESTORE_GCODE_STATE NAME=PAUSE_state MOVE=1
BASE_RESUME
[gcode_macro UNLOAD]
gcode:
G91
G1 E10.0 F1200
G1 E3.0 F1600
G1 E-13.14 F7000
G1 E-100 F3000
[gcode_macro M600]
gcode:
PAUSE