v2.4: update macros
This commit is contained in:
parent
e06e6385f4
commit
988257a6f1
3 changed files with 77 additions and 59 deletions
|
@ -1,7 +1,10 @@
|
|||
####################################################################
|
||||
# Helper macros
|
||||
# - MOVE_SPEED
|
||||
# - ...
|
||||
# - NOTIFY_BED
|
||||
# - NOTIFY_EXTRUDER
|
||||
# - ZC - calibrate z and move to front to measure
|
||||
# - TZC - Test Z Calibration
|
||||
####################################################################
|
||||
|
||||
[gcode_macro MOVE_SPEED]
|
||||
|
@ -42,30 +45,33 @@ gcode:
|
|||
M118 Already printing
|
||||
{% endif %}
|
||||
|
||||
[gcode_macro fes]
|
||||
description: query filament sensor encoder_sensor
|
||||
gcode:
|
||||
QUERY_FILAMENT_SENSOR SENSOR=encoder_sensor
|
||||
|
||||
[gcode_macro fts]
|
||||
description: query filament sensor toolhead_sensor
|
||||
[gcode_macro NOTIFY_BED]
|
||||
gcode:
|
||||
QUERY_FILAMENT_SENSOR SENSOR=toolhead_sensor
|
||||
|
||||
[gcode_macro zc]
|
||||
gcode:
|
||||
{% set z_run = params.CUR|default(0.4)|float %}
|
||||
{% set z_hold = z_run %}
|
||||
{action_respond_info("zc: setting zcurrent to %.2f" % z_run)}
|
||||
SET_TMC_CURRENT STEPPER=stepper_z CURRENT={z_run} HOLDCURRENT={z_hold}
|
||||
SET_TMC_CURRENT STEPPER=stepper_z1 CURRENT={z_run} HOLDCURRENT={z_hold}
|
||||
SET_TMC_CURRENT STEPPER=stepper_z2 CURRENT={z_run} HOLDCURRENT={z_hold}
|
||||
SET_TMC_CURRENT STEPPER=stepper_z3 CURRENT={z_run} HOLDCURRENT={z_hold}
|
||||
{% set BED=params.BED|default(0)|int %}
|
||||
M117 HEATING BED from {printer.heater_bed.temperature} to {BED}
|
||||
M118 HEATING BED from {printer.heater_bed.temperature} to {BED}
|
||||
|
||||
|
||||
[gcode_macro zm]
|
||||
[gcode_macro NOTIFY_EXTRUDER]
|
||||
gcode:
|
||||
{% set F = params.SPEED|default(300)|int %}
|
||||
{action_respond_info("moving with F=%d" % F)}
|
||||
G0 Z30 F{F}
|
||||
G0 Z10 F{F}
|
||||
{% set EXTRUDER=params.EXTRUDER|default(0)|int %}
|
||||
M117 HEATING EXTRUDER from {printer.extruder.temperature} to {EXTRUDER}
|
||||
M118 HEATING EXTRUDER from {printer.extruder.temperature} to {EXTRUDER}
|
||||
|
||||
|
||||
[gcode_macro ZC]
|
||||
gcode:
|
||||
G28
|
||||
CALIBRATE_Z
|
||||
G0 X150 Y30 Z2 F10000
|
||||
G0 Z1 F300
|
||||
|
||||
[gcode_macro TZC]
|
||||
gcode:
|
||||
{% set N=params.N|default(1)|int %}
|
||||
{% for i in range(N) %}
|
||||
M118 move {(i+1)}/{N}
|
||||
G28
|
||||
CALIBRATE_Z
|
||||
{% endfor %}
|
||||
|
|
|
@ -22,7 +22,6 @@ gcode:
|
|||
{% set z0=1.5 %}
|
||||
{% set z_hop = printer['gcode_macro _USER_VARIABLE'].z_hop|int %}
|
||||
{% if "xyz" in printer.toolhead.homed_axes %}
|
||||
M118 brushie brushie brushie
|
||||
G0 Z{z_hop} F1000 # move Z to travel height
|
||||
G0 X{x0} Y{y0} F6000 # move to x0/y0
|
||||
G0 Z{z0} # lower
|
||||
|
@ -118,17 +117,15 @@ gcode:
|
|||
gcode:
|
||||
{% set BED=params.BED|default(100)|int %}
|
||||
{% set EXTRUDER=params.EXTRUDER|default(250)|int %}
|
||||
{% set CHAMBER=params.CHAMBER|default(0)|int %}
|
||||
{% set SHEET=params.SHEET|default("default")|string %}
|
||||
{% set QGL=params.QGL|default(1)|int %}
|
||||
{% set BMC=params.BMC|default(0)|int %}
|
||||
{% set SHEET=params.SHEET|default("default")|string %}
|
||||
{% set PURGE=params.PURGE|default(1)|int %}
|
||||
{% set SOAK=params.SOAK|default(0)|int * 1000 * 60 %}
|
||||
{% set Z_ADJUST=params.Z_ADJUST|default(0.0)|float %}
|
||||
{% set ERCF=params.ERCF|default(0)|int %}
|
||||
{% set ERCF_EXTRUDER=params.ERCF_EXTRUDER|default(0)|int %}
|
||||
{action_respond_info("starting print BED=%d, EXTRUDER=%d, CHAMBER=%d, SHEET=%s, QGL=%d, BMC=%d, PURGE=%d, SOAK=%d, Z_AJUST=%f, ERCF=%d, ERCF_EXTRUDER=%d" % (BED, EXTRUDER, CHAMBER, SHEET, QGL, BMC, PURGE, SOAK, Z_ADJUST, ERCF, ERCF_EXTRUDER))}
|
||||
M118 configuring
|
||||
{action_respond_info("starting print BED=%d, EXTRUDER=%d, SHEET=%s, BMC=%d, PURGE=%d, Z_AJUST=%f, ERCF=%d, ERCF_EXTRUDER=%d" % (BED, EXTRUDER, SHEET, BMC, PURGE, Z_ADJUST, ERCF, ERCF_EXTRUDER))}
|
||||
M117 CONFIGURING
|
||||
M118 CONFIGURING
|
||||
SET_GCODE_OFFSET Z=0.0 # reset z offset
|
||||
M140 S{BED} # start bed heating
|
||||
M104 S{EXTRUDER} # start extruder heating
|
||||
|
@ -137,49 +134,60 @@ gcode:
|
|||
G90 # use absolute coordinates
|
||||
M83 # use relative distances for extrusion
|
||||
|
||||
G4 P2000
|
||||
{% if BMC %}
|
||||
BED_MESH_CLEAR
|
||||
BED_MESH_CLEAR
|
||||
{% if not "xyz" in printer.toolhead.homed_axes %}
|
||||
M117 HOME
|
||||
M118 HOME
|
||||
G28
|
||||
{% else %}
|
||||
M117 NO HOME
|
||||
M118 NO HOME
|
||||
{% endif %}
|
||||
M118 home
|
||||
G28
|
||||
BRUSHIE
|
||||
{% if QGL %}
|
||||
M118 qgl
|
||||
|
||||
{% if printer.quad_gantry_level.applied|lower == 'false' %}
|
||||
M117 QGL
|
||||
M118 QGL
|
||||
QUAD_GANTRY_LEVEL PARK=false
|
||||
BRUSHIE
|
||||
{% else %}
|
||||
M117 NO QGL
|
||||
M118 NO QGL
|
||||
{% endif %}
|
||||
M118 calibrate z
|
||||
CALIBRATE_Z
|
||||
|
||||
{% if BMC %}
|
||||
M118 bed mesh calibrate
|
||||
M117 BED MESH CALIBRATE
|
||||
M118 BED MESH CALIBRATE
|
||||
BED_MESH_CALIBRATE
|
||||
{% else %}
|
||||
M118 bed mesh load {SHEET}
|
||||
M117 BED MESH LOAD {SHEET}
|
||||
M118 BED MESH LOAD {SHEET}
|
||||
BED_MESH_PROFILE LOAD={SHEET}
|
||||
{% endif %}
|
||||
|
||||
M118 heating
|
||||
G4 P2000
|
||||
G92 E0 # reset extruder
|
||||
M190 S{BED} # set and wait for bed temperature
|
||||
M109 S{EXTRUDER} # set and wait for nozzle temperature
|
||||
TEMPERATURE_WAIT SENSOR="temperature_sensor chamber" MINIMUM={CHAMBER} # wait for chamber temp
|
||||
{% if SOAK > 0 %}
|
||||
M118 soaking for {SOAK/1000/60|int} min
|
||||
G4 P{SOAK}
|
||||
{% endif %}
|
||||
M117 CALIBRATE_Z
|
||||
M118 CALIBRATE_Z
|
||||
BRUSHIE
|
||||
G28 Z
|
||||
CALIBRATE_Z
|
||||
|
||||
G92 E0 # reset extruder
|
||||
NOTIFY_BED BED={BED}
|
||||
M190 S{BED} # set and wait for bed temperature
|
||||
NOTIFY_EXTRUDER EXTRUDER={EXTRUDER}
|
||||
M109 S{EXTRUDER} # set and wait for extruder temperature
|
||||
|
||||
M118 starting
|
||||
SET_GCODE_OFFSET Z_ADJUST={params.Z_ADJUST|default(0.0)|float} MOVE=1
|
||||
{% if ERCF %}
|
||||
M117 ercf changing to tool {ERCF_EXTRUDER}
|
||||
M118 ercf changing to tool {ERCF_EXTRUDER}
|
||||
ERCF_HOME
|
||||
ERCF_CHANGE_TOOL_SLICER TOOL={ERCF_EXTRUDER}
|
||||
{% endif %}
|
||||
BRUSHIE
|
||||
{% if PURGE %}
|
||||
PURGE_NOZZLE
|
||||
{% endif %}
|
||||
M117 STARTING
|
||||
M118 STARTING
|
||||
|
||||
|
||||
# - PRINT_END
|
||||
|
@ -209,7 +217,7 @@ gcode:
|
|||
M118 purge nozzle
|
||||
G0 Z{z_hop} F300 # move Z to travel height
|
||||
G0 X{x0} Y{y0} F5000 # move to x0/y0
|
||||
G0 Z0.24 F300 # lower Z
|
||||
G0 Z0.24 F300 # lower Z to 75%
|
||||
G0 X{x1} E20 F1500 # draw line
|
||||
G0 Y{y1} # move to y1
|
||||
G0 X{x0} E10 # draw fine line
|
||||
|
@ -247,7 +255,6 @@ gcode:
|
|||
{% if printer["gcode_macro ERCF_VAR"].clog_detection|int == 1 %}
|
||||
SET_FILAMENT_SENSOR SENSOR=encoder_sensor ENABLE=1
|
||||
{% endif %}
|
||||
M118 calling _RESUME_BASE
|
||||
G4 P2000
|
||||
_RESUME_BASE
|
||||
{% endif %}
|
||||
|
|
|
@ -88,14 +88,19 @@ gcode:
|
|||
{% set z_run = printer['gcode_macro _USER_VARIABLE'].z_home_current %}
|
||||
{% set z_hold = printer['gcode_macro _USER_VARIABLE'].z_home_current %}
|
||||
{% else %}
|
||||
{% if 'tmc2209 stepper_z' in printer.configfile.settings %}
|
||||
## XY
|
||||
{% if 'tmc2209 stepper_x' in printer.configfile.settings %}
|
||||
{% set xy_run = printer.configfile.settings['tmc2209 stepper_x'].run_current %}
|
||||
{% set xy_hold = printer.configfile.settings['tmc2209 stepper_x'].hold_current %}
|
||||
{% elif 'tmc5160 stepper_x' in printer.configfile.settings %}
|
||||
{% set xy_run = printer.configfile.settings['tmc5160 stepper_x'].run_current %}
|
||||
{% set xy_hold = printer.configfile.settings['tmc5160 stepper_x'].hold_current %}
|
||||
{% endif %}
|
||||
## Z
|
||||
{% if 'tmc2209 stepper_z' in printer.configfile.settings %}
|
||||
{% set z_run = printer.configfile.settings['tmc2209 stepper_z'].run_current %}
|
||||
{% set z_hold = printer.configfile.settings['tmc2209 stepper_z'].hold_current %}
|
||||
{% elif 'tmc5160 stepper_z' in printer.configfile.settings %}
|
||||
{% set xy_run = printer.configfile.settings['tmc5160 stepper_x'].run_current %}
|
||||
{% set xy_hold = printer.configfile.settings['tmc5160 stepper_x'].hold_current %}
|
||||
{% set z_run = printer.configfile.settings['tmc5160 stepper_z'].run_current %}
|
||||
{% set z_hold = printer.configfile.settings['tmc5160 stepper_z'].hold_current %}
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in a new issue