printer: add ebb36 with sensorless homing
This commit is contained in:
parent
556b32e0f6
commit
3b6ad1b9f8
6 changed files with 183 additions and 105 deletions
|
@ -5,4 +5,5 @@
|
|||
[include debug.cfg]
|
||||
[include helpers.cfg]
|
||||
[include print.cfg]
|
||||
[include sensorless.cfg]
|
||||
[include timelapse.cfg]
|
||||
|
|
76
macros/sensorless.cfg
Normal file
76
macros/sensorless.cfg
Normal file
|
@ -0,0 +1,76 @@
|
|||
[gcode_macro _HOME_X]
|
||||
gcode:
|
||||
# Always use consistent run_current on A/B steppers during sensorless homing
|
||||
{% set RUN_CURRENT_X = printer.configfile.settings['tmc5160 stepper_x'].run_current|float %}
|
||||
{% set RUN_CURRENT_Y = printer.configfile.settings['tmc5160 stepper_y'].run_current|float %}
|
||||
{% set HOME_CURRENT = 0.5 %}
|
||||
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOME_CURRENT}
|
||||
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={HOME_CURRENT}
|
||||
|
||||
# Home
|
||||
G28 X
|
||||
# Move away
|
||||
G91
|
||||
G1 X-10 F1200
|
||||
G90
|
||||
|
||||
# Wait just a moment
|
||||
G4 P500
|
||||
# Set current during print
|
||||
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 current for sensorless homing
|
||||
{% set RUN_CURRENT_X = printer.configfile.settings['tmc5160 stepper_x'].run_current|float %}
|
||||
{% set RUN_CURRENT_Y = printer.configfile.settings['tmc5160 stepper_y'].run_current|float %}
|
||||
{% set HOME_CURRENT = 0.5 %}
|
||||
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOME_CURRENT}
|
||||
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={HOME_CURRENT}
|
||||
|
||||
# Home
|
||||
G28 Y
|
||||
# Move away
|
||||
G91
|
||||
G1 Y-10 F1200
|
||||
G90
|
||||
|
||||
# Wait just a moment
|
||||
G4 P500
|
||||
# Set current during print
|
||||
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CURRENT_X}
|
||||
SET_TMC_CURRENT STEPPER=stepper_y CURRENT={RUN_CURRENT_Y}
|
||||
|
||||
[homing_override]
|
||||
axes: xyz
|
||||
set_position_z: 0
|
||||
gcode:
|
||||
{% set home_all = 'X' not in params and 'Y' not in params or 'Z' in params %}
|
||||
|
||||
# set_position_z does home z
|
||||
# but if x and y are not, guess that z is not really either z
|
||||
{% if not "x" in printer.toolhead.homed_axes and not "y" in printer.toolhead.homed_axes %}
|
||||
# move up 5
|
||||
G91
|
||||
G0 Z5
|
||||
G90
|
||||
{% else %}
|
||||
# or to 5
|
||||
G0 Z5
|
||||
{% endif %}
|
||||
|
||||
{% 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 %}
|
||||
G0 X150 Y150 F6000
|
||||
G28 Z
|
||||
G1 Z10
|
||||
{% endif %}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue