v2.4: update macros
This commit is contained in:
parent
8ef8f70661
commit
1d9aab9cdf
2 changed files with 58 additions and 6 deletions
61
macros.cfg
61
macros.cfg
|
@ -7,6 +7,16 @@ gcode:
|
||||||
G0 X150 Y150 Z30 F3600
|
G0 X150 Y150 Z30 F3600
|
||||||
|
|
||||||
|
|
||||||
|
[gcode_macro M600]
|
||||||
|
description: Change filament
|
||||||
|
gcode:
|
||||||
|
SAVE_GCODE_STATE NAME=M600_state
|
||||||
|
PAUSE
|
||||||
|
FILAMENT_UNLOAD
|
||||||
|
M117 >> change filament
|
||||||
|
RESTORE_GCODE_STATE NAME=M600_state
|
||||||
|
|
||||||
|
|
||||||
[gcode_macro CANCEL_PRINT]
|
[gcode_macro CANCEL_PRINT]
|
||||||
description: Cancel the actual running print
|
description: Cancel the actual running print
|
||||||
rename_existing: CANCEL_PRINT_BASE
|
rename_existing: CANCEL_PRINT_BASE
|
||||||
|
@ -14,6 +24,16 @@ gcode:
|
||||||
TURN_OFF_HEATERS
|
TURN_OFF_HEATERS
|
||||||
CANCEL_PRINT_BASE
|
CANCEL_PRINT_BASE
|
||||||
|
|
||||||
|
|
||||||
|
[gcode_macro CENTER]
|
||||||
|
gcode:
|
||||||
|
{% if "xyz" in printer.toolhead.homed_axes %}
|
||||||
|
G0 X150 Y150 F10000
|
||||||
|
{% else %}
|
||||||
|
{action_respond_info("Printer not homed")}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
[gcode_macro PAUSE]
|
[gcode_macro PAUSE]
|
||||||
description: Pause the actual running print
|
description: Pause the actual running print
|
||||||
rename_existing: PAUSE_BASE
|
rename_existing: PAUSE_BASE
|
||||||
|
@ -23,8 +43,10 @@ gcode:
|
||||||
# read E from pause macro
|
# read E from pause macro
|
||||||
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
|
{% set E = printer["gcode_macro PAUSE"].extrude|float %}
|
||||||
# set park positon for x and y
|
# set park positon for x and y
|
||||||
|
## close to max
|
||||||
{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
|
{% set x_park = printer.toolhead.axis_maximum.x|float - 5.0 %}
|
||||||
{% set y_park = printer.toolhead.axis_maximum.y|float - 5.0 %}
|
## close to min
|
||||||
|
{% set y_park = printer.toolhead.axis_minimum.y|float + 5.0 %}
|
||||||
# calculate save lift position
|
# calculate save lift position
|
||||||
{% set max_z = printer.toolhead.axis_maximum.z|float %}
|
{% set max_z = printer.toolhead.axis_maximum.z|float %}
|
||||||
{% set act_z = printer.toolhead.position.z|float %}
|
{% set act_z = printer.toolhead.position.z|float %}
|
||||||
|
@ -34,6 +56,7 @@ gcode:
|
||||||
{% set z_safe = max_z - act_z %}
|
{% set z_safe = max_z - act_z %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
# end of definitions
|
# end of definitions
|
||||||
|
M117 >> pause
|
||||||
PAUSE_BASE
|
PAUSE_BASE
|
||||||
G91
|
G91
|
||||||
{% if printer.extruder.can_extrude|lower == 'true' %}
|
{% if printer.extruder.can_extrude|lower == 'true' %}
|
||||||
|
@ -62,9 +85,10 @@ gcode:
|
||||||
{% set get_params = "" %}
|
{% set get_params = "" %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
# end of definitions
|
# end of definitions
|
||||||
|
M117 >> resume
|
||||||
{% if printer.extruder.can_extrude|lower == 'true' %}
|
{% if printer.extruder.can_extrude|lower == 'true' %}
|
||||||
G91
|
G91
|
||||||
G1 E{E} F2100
|
G1 E{E} F6000
|
||||||
{% else %}
|
{% else %}
|
||||||
{action_respond_info("Extruder not hot enough")}
|
{action_respond_info("Extruder not hot enough")}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -76,7 +100,7 @@ description: unload filament
|
||||||
gcode:
|
gcode:
|
||||||
{% if printer.extruder.can_extrude|lower == 'true' %}
|
{% if printer.extruder.can_extrude|lower == 'true' %}
|
||||||
M83 # e relative coordinates
|
M83 # e relative coordinates
|
||||||
G0 E-75 F3000 # unload
|
G0 E-75 F3000 # unload
|
||||||
M82 # e absolute coordinates
|
M82 # e absolute coordinates
|
||||||
{% else %}
|
{% else %}
|
||||||
{action_respond_info("extruder not hot enough")}
|
{action_respond_info("extruder not hot enough")}
|
||||||
|
@ -88,8 +112,9 @@ description: load filament
|
||||||
gcode:
|
gcode:
|
||||||
{% if printer.extruder.can_extrude|lower == 'true' %}
|
{% if printer.extruder.can_extrude|lower == 'true' %}
|
||||||
M83 # e relative coordinates
|
M83 # e relative coordinates
|
||||||
G0 E75 F3000
|
G0 E50 F3000 # load fast
|
||||||
G0 E30 F300
|
G4 P1000 # wait 1s
|
||||||
|
G0 E35 F300 # load slow
|
||||||
M82 # e absolute coordinates
|
M82 # e absolute coordinates
|
||||||
{% else %}
|
{% else %}
|
||||||
{action_respond_info("extruder not hot enough")}
|
{action_respond_info("extruder not hot enough")}
|
||||||
|
@ -102,13 +127,22 @@ gcode:
|
||||||
{% set e = params.e|default(10)|float %}
|
{% set e = params.e|default(10)|float %}
|
||||||
{% if printer.extruder.can_extrude|lower == 'true' %}
|
{% if printer.extruder.can_extrude|lower == 'true' %}
|
||||||
M83 # e relative coordinates
|
M83 # e relative coordinates
|
||||||
G1 E-{e} F300
|
G1 E{e} F300
|
||||||
M82 # e absolute coordinates
|
M82 # e absolute coordinates
|
||||||
{% else %}
|
{% else %}
|
||||||
{action_respond_info("extruder not hot enough")}
|
{action_respond_info("extruder not hot enough")}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
[gcode_macro HOME]
|
||||||
|
gcode:
|
||||||
|
M117 >> homing
|
||||||
|
G28
|
||||||
|
M117 >> moving
|
||||||
|
G0 X150 Y25 Z30 F10000
|
||||||
|
M117 >> homing done
|
||||||
|
|
||||||
|
|
||||||
[gcode_macro PRINT_START]
|
[gcode_macro PRINT_START]
|
||||||
gcode:
|
gcode:
|
||||||
M117 >> configuring
|
M117 >> configuring
|
||||||
|
@ -135,6 +169,21 @@ gcode:
|
||||||
SET_LED LED=caselight RED=0.50 GREEN=0.50 BLUE=0.50
|
SET_LED LED=caselight RED=0.50 GREEN=0.50 BLUE=0.50
|
||||||
|
|
||||||
|
|
||||||
|
[gcode_macro CLEAN_NOZZLE]
|
||||||
|
gcode:
|
||||||
|
{% set y0=params.y0|default(15) %}
|
||||||
|
{% set y1=params.y1|default(15.8) %}
|
||||||
|
{% set x0=params.x0|default(75) %}
|
||||||
|
{% set x1=params.x1|default(225) %}
|
||||||
|
M117 >> clean nozzle
|
||||||
|
G0 Z5 F300 # move Z to travel height
|
||||||
|
G0 X{x0} Y{y0} F5000 # move to x0/y0
|
||||||
|
G0 Z0.2 F1500 # lower Z
|
||||||
|
G0 X{x1} E30 # draw line
|
||||||
|
G0 Y{y1} # move to y1
|
||||||
|
G0 X{y0} E15 # draw fine line
|
||||||
|
|
||||||
|
|
||||||
[gcode_macro PRINT_END]
|
[gcode_macro PRINT_END]
|
||||||
gcode:
|
gcode:
|
||||||
M117 >> finished
|
M117 >> finished
|
||||||
|
|
|
@ -227,6 +227,9 @@ min_extrude_temp: 170
|
||||||
pressure_advance: 0.05
|
pressure_advance: 0.05
|
||||||
## Default is 0.040, leave stock
|
## Default is 0.040, leave stock
|
||||||
pressure_advance_smooth_time: 0.040
|
pressure_advance_smooth_time: 0.040
|
||||||
|
# Maximum length (in mm of raw filament) that a retraction or
|
||||||
|
# extrude-only move may have, default: 50
|
||||||
|
max_extrude_only_distance: 100
|
||||||
|
|
||||||
## E0 on MOTOR6
|
## E0 on MOTOR6
|
||||||
[tmc2209 extruder]
|
[tmc2209 extruder]
|
||||||
|
|
Loading…
Reference in a new issue