-
Notifications
You must be signed in to change notification settings - Fork 0
/
my_macros.cfg
53 lines (51 loc) · 3.5 KB
/
my_macros.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
[gcode_macro _CLIENT_VARIABLE]
variable_use_custom_pos : True ; use custom park coordinates for x,y [True/False]
variable_custom_park_x : 5.0 ; custom x position; value must be within your defined min and max of X
variable_custom_park_y : 320.0 ; custom y position; value must be within your defined min and max of Y
variable_custom_park_dz : 10.0 ; custom dz value; the value in mm to lift the nozzle when move to park position
variable_retract : .60 ; the value to retract while PAUSE
variable_cancel_retract : 5.0 ; the value to retract while CANCEL_PRINT
variable_speed_retract : 35.0 ; retract speed in mm/s
variable_unretract : .70 ; the value to unretract while RESUME
variable_speed_unretract : 35.0 ; unretract speed in mm/s
variable_speed_hop : 15.0 ; z move speed in mm/s
variable_speed_move : 100.0 ; move speed in mm/s
variable_park_at_cancel : True ; allow to move the toolhead to park while execute CANCEL_PRINT [True/False]
variable_park_at_cancel_x : None ; different park position during CANCEL_PRINT [None/Position as Float]; park_at_cancel must be True
variable_park_at_cancel_y : None ; different park position during CANCEL_PRINT [None/Position as Float]; park_at_cancel must be True
# !!! Caution [firmware_retraction] must be defined in the printer.cfg if you set use_fw_retract: True !!!
variable_use_fw_retract : False ; use fw_retraction instead of the manual version [True/False]
variable_idle_timeout : 0 ; time in sec until idle_timeout kicks in. Value 0 means that no value will be set or restored
variable_runout_sensor : "filament_switch_sensor filament_sensor" ; If a sensor is defined, it will be used to cancel the execution of RESUME in case no filament is detected.
# Specify the config name of the runout sensor e.g "filament_switch_sensor runout". Hint use the same as in your printer.cfg
# !!! Custom macros, please use with care and review the section of the corresponding macro.
## These macros are for simple operations like setting a status LED. Please make sure your macro does not interfere with the basic macro functions.
## Only single line commands are supported, please create a macro if you need more than one command.
variable_user_pause_macro : "_Z_RAISE" ; Everything inside the "" will be executed after the klipper base pause (PAUSE_BASE) function
variable_user_resume_macro: "" ; Everything inside the "" will be executed before the klipper base resume (RESUME_BASE) function
variable_user_cancel_macro: "_Z_RAISE" ; Everything inside the "" will be executed before the klipper base cancel (CANCEL_PRINT_BASE) function
gcode:
[gcode_macro LOAD_FILAMENT]
variable_load_distance: 50
variable_purge_distance: 25
gcode:
{% set speed = params.SPEED|default(300) %}
{% set max_velocity = printer.configfile.settings['extruder'].max_extrude_only_velocity * 60 %}
SAVE_GCODE_STATE NAME=load_state
G91
G92 E0
G1 E{load_distance} F{max_velocity} # fast-load
G1 E{purge_distance} F{speed} # purge
RESTORE_GCODE_STATE NAME=load_state
[gcode_macro UNLOAD_FILAMENT]
variable_unload_distance: 50
variable_purge_distance: 25
gcode:
{% set speed = params.SPEED|default(300) %}
{% set max_velocity = printer.configfile.settings['extruder'].max_extrude_only_velocity * 60 %}
SAVE_GCODE_STATE NAME=unload_state
G91
G92 E0
G1 E{purge_distance} F{speed} # purge
G1 E-{unload_distance} F{max_velocity} # fast-unload
RESTORE_GCODE_STATE NAME=unload_state