I am trying to understand this macro.
Using Macros when Homing/TMC_Drivers.html#using-macros-when-homing)
After sensorless homing completes the carriage will be pressed against the end of the rail and the stepper will exert a force on the frame until the carriage is moved away. It is a good idea to create a macro to home the axis and immediately move the carriage away from the end of the rail.
It is a good idea for the macro to pause at least 2 seconds prior to starting sensorless homing (or otherwise ensure that there has been no movement on the stepper for 2 seconds). Without a delay it is possible for the driver’s internal stall flag to still be set from a previous move.
It can also be useful to have that macro set the driver current before homing and set a new current after the carriage has moved away. This also allows a hold_current to be set during prints (a hold_current is not recommended during sensorless homing).
An example macro might look something like:
[gcode_macro SENSORLESS_HOME_X]
gcode:
{% set HOME_CUR = 0.700 %}
{% set driver_config = printer.configfile.settings['tmc2209 stepper_x'] %}
{% set RUN_CUR = driver_config.run_current %}
{% set HOLD_CUR = driver_config.hold_current %}
# Set current for sensorless homing
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOME_CUR} HOLDCURRENT={HOME_CUR}
# Pause to ensure driver stall flag is clear
G4 P2000
# Home
G28 X0
# Move away
G90
G1 X5 F1200
# Set current during print
SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CUR} HOLDCURRENT={HOLD_CUR}
The resulting macro can be called from a homing_override config section or from a START_PRINT macro.
It appears to set the hold current to whatever the run current is set at. In this case 0.7 A . I presume this is an example value and should be set to the machines requirements.
There is also advice in the docs that the hold current should not be set during sensorless homing. Does not set imply 0.0 A ?
I also have a Corexy printer, and I have made a macro for x and one for y, would I need to not set hold current for both x and y in each macro ?
I am using BLTouch as my Z endstop and am working my way to having a homing overide macro that provides same as safe_z_home as I am aware that are mutually exclusive.
I see from various sources that people are happily doing corexy sensorless homing. I am using a board with integrated TMC22009 so no problems connecting uart and diag pins. Just need to get homing sequence right.
Will carry on RTFMing.