nozzle_scrub.cfg modified - 17/04/25 - 09:34:36
This commit is contained in:
1 parent
c102689a8b
commit
0d6741d356
1 file changed
@@ -0,0 +1,95 @@
|
||||
# Note you may need to add the following to your printer.cfg somewhere (without the comments of course) for the Kinematic position stuff below to work.
|
||||
#[force_move]
|
||||
#enable_force_move: True
|
||||
|
||||
#[safe_z_home]
|
||||
#home_xy_position: 175, 175
|
||||
#speed: 150.0
|
||||
#z_hop: 2
|
||||
#z_hop_speed: 15.0
|
||||
#move_to_previous: False
|
||||
|
||||
[gcode_macro _HOME_X]
|
||||
gcode:
|
||||
# Home
|
||||
{% set RUN_CURRENT_X = printer.configfile.settings['tmc2209 stepper_x'].run_current|float %}
|
||||
{% set RUN_CURRENT_Y = printer.configfile.settings['tmc2209 stepper_y'].run_current|float %}
|
||||
{% set HOME_CURRENT = 0.49 %}
|
||||
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOME_CURRENT}
|
||||
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={HOME_CURRENT}
|
||||
|
||||
SET_KINEMATIC_POSITION X=5
|
||||
G91
|
||||
G1 X-5 F1200
|
||||
|
||||
#G4 P2000
|
||||
#M400 to finish all pending moves/process the buffer
|
||||
M400
|
||||
G28 X
|
||||
|
||||
# Move away
|
||||
G91
|
||||
G1 X-5 F1200
|
||||
|
||||
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CURRENT_X}
|
||||
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={RUN_CURRENT_Y}
|
||||
|
||||
[gcode_macro _HOME_Y]
|
||||
gcode:
|
||||
{% set RUN_CURRENT_X = printer.configfile.settings['tmc2209 stepper_x'].run_current|float %}
|
||||
{% set RUN_CURRENT_Y = printer.configfile.settings['tmc2209 stepper_y'].run_current|float %}
|
||||
{% set HOME_CURRENT = 0.49 %}
|
||||
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOME_CURRENT}
|
||||
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={HOME_CURRENT}
|
||||
|
||||
SET_KINEMATIC_POSITION Y=5
|
||||
G91
|
||||
G1 Y-5 F1200
|
||||
|
||||
#G4 P2000
|
||||
#M400 to finish all pending moves/process the buffer
|
||||
M400
|
||||
|
||||
# Home
|
||||
G28 Y
|
||||
# Move away
|
||||
G91
|
||||
G1 Y-5 F1200
|
||||
|
||||
# Wait just a second… (give StallGuard registers time to clear)
|
||||
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CURRENT_X}
|
||||
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={RUN_CURRENT_Y}
|
||||
|
||||
[homing_override]
|
||||
axes: xyz
|
||||
gcode:
|
||||
{% set home_all = 'X' not in params and 'Y' not in params and 'Z' not in params %}
|
||||
|
||||
SET_KINEMATIC_POSITION Z=0
|
||||
G1 Z5 F1200
|
||||
|
||||
{% if home_all or 'X' in params %}
|
||||
_HOME_X
|
||||
{% endif %}
|
||||
|
||||
{% if home_all or 'Y' in params %}
|
||||
_HOME_Y
|
||||
{% endif %}
|
||||
|
||||
{% if home_all or 'Z' in params %}
|
||||
|
||||
G90
|
||||
G1 X{ printer.toolhead.axis_maximum.x/2 } Y{ printer.toolhead.axis_maximum.y/2 } F4500
|
||||
|
||||
G28 Z
|
||||
|
||||
G1 Z10 F1500
|
||||
{% endif %}
|
||||
|
||||
|
||||
[gcode_macro _CG28]
|
||||
description: Homing only if necessary
|
||||
gcode:
|
||||
{% if "xyz" not in printer.toolhead.homed_axes %}
|
||||
G28
|
||||
{% endif %}
|
||||
Reference in new issue
Block a user