v2.4: update, reorder macros
macros
This commit is contained in:
parent
f0b509ed84
commit
81bc1ff901
2 changed files with 188 additions and 120 deletions
|
@ -249,3 +249,22 @@ panel: system
|
|||
name: {{ gettext('Settings') }}
|
||||
icon: settings
|
||||
panel: settings
|
||||
#~# --- Do not edit below this line. This section is auto generated --- #~#
|
||||
|
||||
#~#
|
||||
#~# [main]
|
||||
#~# move_speed = 30
|
||||
#~#
|
||||
#~# [displayed_macros Printer]
|
||||
#~# g32 = False
|
||||
#~# park = False
|
||||
#~# cancel_print = False
|
||||
#~# print_start = False
|
||||
#~# print_end = False
|
||||
#~# pause = False
|
||||
#~# print_layer_change = False
|
||||
#~# probe = False
|
||||
#~# resume = False
|
||||
#~# probe_calibrate = False
|
||||
#~# purge_nozzle = False
|
||||
#~#
|
||||
|
|
255
macros.cfg
255
macros.cfg
|
@ -1,34 +1,11 @@
|
|||
[gcode_macro G32]
|
||||
## HELPERS
|
||||
[gcode_macro ZES]
|
||||
description: Z_ENDSTOP_CALIBRATE + extras
|
||||
gcode:
|
||||
BED_MESH_CLEAR
|
||||
M117 > home
|
||||
G28
|
||||
M117 > qgl
|
||||
QUAD_GANTRY_LEVEL
|
||||
M117 > home
|
||||
G28
|
||||
# M117 > bed mesh calibrate
|
||||
# BED_MESH_CALIBRATE
|
||||
BED_MESH_PROFILE load=default # load default bed_mesh profile
|
||||
G0 X150 Y150 Z30 F3600
|
||||
|
||||
|
||||
[gcode_macro M600]
|
||||
description: Change filament
|
||||
gcode:
|
||||
SAVE_GCODE_STATE NAME=M600_state
|
||||
PAUSE Y=15
|
||||
M117 > change filament
|
||||
RESTORE_GCODE_STATE NAME=M600_state
|
||||
|
||||
|
||||
[gcode_macro CANCEL_PRINT]
|
||||
description: Cancel the actual running print
|
||||
rename_existing: CANCEL_PRINT_BASE
|
||||
gcode:
|
||||
TURN_OFF_HEATERS
|
||||
PARK
|
||||
CANCEL_PRINT_BASE
|
||||
G0 X150 Y150 Z10 F10000
|
||||
Z_ENDSTOP_CALIBRATE
|
||||
TESTZ Z=-9
|
||||
|
||||
|
||||
[gcode_macro CENTER]
|
||||
|
@ -43,6 +20,41 @@ gcode:
|
|||
{% endif %}
|
||||
|
||||
|
||||
[gcode_macro PURGE_NOZZLE]
|
||||
gcode:
|
||||
{% set x0=params.x0|default(75) %}
|
||||
{% set x1=params.x1|default(225) %}
|
||||
{% set y0=params.y0|default(15) %}
|
||||
{% set y1=params.y1|default(15.8) %}
|
||||
M117 > purge nozzle
|
||||
G0 Z10 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{x0} E15 # draw fine line
|
||||
|
||||
|
||||
[gcode_macro BRUSHIE]
|
||||
gcode:
|
||||
{% set x0=50 %}
|
||||
{% set x1=110 %}
|
||||
{% set y0=305 %}
|
||||
{% set z0=2 %}
|
||||
{% if "xyz" in printer.toolhead.homed_axes %}
|
||||
M117 > brushie brushie brushie
|
||||
G0 Z20 F1000 # move Z to travel height
|
||||
G0 X{x0} Y{y0} F5000 # move to x0/y0
|
||||
G0 Z{z0} # lower
|
||||
G0 X{x1} # back
|
||||
G0 X{x0} # forth
|
||||
G0 X{x1} # back
|
||||
G0 Z20 F300 # move Z to travel height
|
||||
{% else %}
|
||||
{action_respond_info("Printer not homed")}
|
||||
{% endif %}
|
||||
|
||||
|
||||
[gcode_macro PARK]
|
||||
gcode:
|
||||
{% set Y=params.Y|default(295) %}
|
||||
|
@ -71,26 +83,93 @@ gcode:
|
|||
{% endif %}
|
||||
|
||||
|
||||
[gcode_macro PROBE]
|
||||
description: Override PROBE and make sure we're over the bed
|
||||
rename_existing: PROBE_BASE
|
||||
[gcode_macro G32]
|
||||
gcode:
|
||||
{%- if printer.toolhead.position.y|float > 270 -%}
|
||||
G0 Y270
|
||||
{%- endif -%}
|
||||
PROBE_BASE
|
||||
BED_MESH_CLEAR
|
||||
M117 > home
|
||||
G28
|
||||
M117 > qgl
|
||||
QUAD_GANTRY_LEVEL
|
||||
M117 > brushie
|
||||
BRUSHIE
|
||||
M117 > home
|
||||
G28
|
||||
M117 > bed mesh calibrate
|
||||
BED_MESH_CALIBRATE
|
||||
# BED_MESH_PROFILE load=default # load default bed_mesh profile
|
||||
G0 X150 Y150 Z30 F3600
|
||||
|
||||
|
||||
[gcode_macro PROBE_CALIBRATE]
|
||||
description: Override PROBE_CALIBRATE and make sure we're over the bed
|
||||
rename_existing: PROBE_CALIBRATE_BASE
|
||||
[gcode_macro M600]
|
||||
description: Change filament
|
||||
gcode:
|
||||
{%- if printer.toolhead.position.y|float > 270 -%}
|
||||
G0 Y270
|
||||
{%- endif -%}
|
||||
PROBE_CALIBRATE_BASE
|
||||
SAVE_GCODE_STATE NAME=M600_state
|
||||
PAUSE Y=15
|
||||
M117 > change filament
|
||||
RESTORE_GCODE_STATE NAME=M600_state
|
||||
|
||||
|
||||
## PRINT_
|
||||
[gcode_macro PRINT_START]
|
||||
gcode:
|
||||
{% set BED=params.BED|default(100) %}
|
||||
{% set EXTRUDER=params.EXTRUDER|default(250) %}
|
||||
{% set SOAK=params.SOAK|default(0)|int * 1000 * 60 %}
|
||||
# TODO
|
||||
{% set BMC=params.BMC|default(0) %}
|
||||
{% set ERCF=params.ERCF|default(0) %}
|
||||
M117 > configuring
|
||||
SET_LED LED=caselight RED=0.00 GREEN=0.00 BLUE=0.50
|
||||
G4 P2000
|
||||
M140 S{BED} # start bed heating
|
||||
M104 S{EXTRUDER} # start extruder heating
|
||||
G92 E0 # reset extruder
|
||||
G21 # set units to millimeters
|
||||
G90 # use absolute coordinates
|
||||
M83 # use relative distances for extrusion
|
||||
|
||||
M117 > homing
|
||||
SET_LED LED=caselight RED=0.00 GREEN=0.50 BLUE=0.00
|
||||
G4 P2000
|
||||
G32 # home, qgl and mesh
|
||||
|
||||
M117 > heating
|
||||
SET_LED LED=caselight RED=0.50 GREEN=0.00 BLUE=0.00
|
||||
G4 P2000
|
||||
G92 E0 # reset extruder
|
||||
M190 S{BED} # set and wait for bed temperature
|
||||
M109 S{EXTRUDER} # set and wait for nozzle temperature
|
||||
M117 > soaking for {SOAK/1000/60|int} min
|
||||
G4 P{SOAK}
|
||||
|
||||
M117 > starting
|
||||
SET_LED LED=caselight RED=0.50 GREEN=0.50 BLUE=0.50
|
||||
G4 P2000
|
||||
# SET_FAN_SPEED FAN=exhaust_fan SPEED=0.5
|
||||
PURGE_NOZZLE
|
||||
|
||||
|
||||
[gcode_macro PRINT_END]
|
||||
gcode:
|
||||
M117 > finished
|
||||
PARK
|
||||
M400 ; wait for buffer to clear
|
||||
G92 E0 ; zero the extruder
|
||||
G1 E-10.0 F3600 ; retract filament
|
||||
TURN_OFF_HEATERS
|
||||
M107 ; turn off fan
|
||||
# SET_FAN_SPEED FAN=exhaust_fan SPEED=0.0
|
||||
|
||||
|
||||
[gcode_macro PRINT_LAYER_CHANGE]
|
||||
gcode:
|
||||
{% set layer=params.LAYER|default(0)|int %}
|
||||
{% set layer_z=params.LAYER_Z|default(0) %}
|
||||
{% set total_layer_count=params.TOTAL_LAYER_COUNT|default(0) %}
|
||||
M117 > layer {layer+1}/{total_layer_count} {layer_z}mm
|
||||
|
||||
|
||||
## OVERRIDES
|
||||
[gcode_macro PAUSE]
|
||||
description: Pause the actual running print
|
||||
rename_existing: PAUSE_BASE
|
||||
|
@ -136,65 +215,35 @@ gcode:
|
|||
RESUME_BASE {get_params}
|
||||
|
||||
|
||||
[gcode_macro PRINT_START]
|
||||
[gcode_macro CANCEL_PRINT]
|
||||
description: Cancel the actual running print
|
||||
rename_existing: CANCEL_PRINT_BASE
|
||||
gcode:
|
||||
M117 > configuring
|
||||
SET_LED LED=caselight RED=0.00 GREEN=0.00 BLUE=0.50
|
||||
G4 P2000
|
||||
M140 S{BED} # start bed heating
|
||||
M104 S{EXTRUDER} # start extruder heating
|
||||
G92 E0 # reset extruder
|
||||
G21 # set units to millimeters
|
||||
G90 # use absolute coordinates
|
||||
M83 # use relative distances for extrusion
|
||||
|
||||
M117 > homing
|
||||
SET_LED LED=caselight RED=0.00 GREEN=0.50 BLUE=0.00
|
||||
G4 P2000
|
||||
G32 # home and qgl
|
||||
|
||||
M117 > heating
|
||||
SET_LED LED=caselight RED=0.50 GREEN=0.00 BLUE=0.00
|
||||
G4 P2000
|
||||
G92 E0 # reset extruder
|
||||
M190 S{BED} # set and wait for bed temperature
|
||||
M109 S{EXTRUDER} # set and wait for nozzle temperature
|
||||
|
||||
M117 > starting
|
||||
SET_LED LED=caselight RED=0.50 GREEN=0.50 BLUE=0.50
|
||||
G4 P2000
|
||||
SET_FAN_SPEED FAN=exhaust_fan SPEED=0.5
|
||||
CLEAN_NOZZLE
|
||||
|
||||
[gcode_macro PRINT_LAYER_CHANGE]
|
||||
gcode:
|
||||
{% set layer=params.LAYER|default(0) %}
|
||||
{% set layer_z=params.LAYER_Z|default(0) %}
|
||||
M117 > layer {layer}/{layer_z}mm
|
||||
|
||||
|
||||
[gcode_macro CLEAN_NOZZLE]
|
||||
gcode:
|
||||
{% set x0=params.x0|default(75) %}
|
||||
{% set x1=params.x1|default(225) %}
|
||||
{% set y0=params.y0|default(15) %}
|
||||
{% set y1=params.y1|default(15.8) %}
|
||||
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{x0} E15 # draw fine line
|
||||
|
||||
|
||||
[gcode_macro PRINT_END]
|
||||
gcode:
|
||||
M117 > finished
|
||||
PARK
|
||||
M400 ; wait for buffer to clear
|
||||
G92 E0 ; zero the extruder
|
||||
G1 E-10.0 F3600 ; retract filament
|
||||
TURN_OFF_HEATERS
|
||||
M107 ; turn off fan
|
||||
SET_FAN_SPEED FAN=exhaust_fan SPEED=0.0
|
||||
PARK
|
||||
CANCEL_PRINT_BASE
|
||||
|
||||
|
||||
[gcode_macro PROBE]
|
||||
description: Override PROBE and make sure we're over the bed
|
||||
rename_existing: PROBE_BASE
|
||||
gcode:
|
||||
{% set P = printer["gcode_macro _Probe_Variables"].probe_attached %}
|
||||
{% if printer.toolhead.position.y|float > 270 %}
|
||||
G0 Y270
|
||||
{% endif %}
|
||||
{% if P %}
|
||||
PROBE_BASE
|
||||
{% else %}
|
||||
{action_respond_info("Probe not attached")}
|
||||
{% endif %}
|
||||
|
||||
|
||||
[gcode_macro PROBE_CALIBRATE]
|
||||
description: Override PROBE_CALIBRATE and make sure we're over the bed
|
||||
rename_existing: PROBE_CALIBRATE_BASE
|
||||
gcode:
|
||||
{%- if printer.toolhead.position.y|float > 270 -%}
|
||||
G0 Y270
|
||||
{%- endif -%}
|
||||
PROBE_CALIBRATE_BASE
|
||||
|
|
Loading…
Reference in a new issue