Corexy + tmc sensorless homing - safe_z_home need a little help

Hello,
i have a corexy with bltouch and i implemented sensorless homing.
Before of that i had a safe_z_home:

# The safe_z_home section modifies the default G28 behavior
#[safe_z_home]
#home_xy_position: 50,50
#speed: 50
#z_hop: 15
#z_hop: 0
#z_hop_speed: 10

Printer makes homing correctly and Z asks for X and Y homing before.

Now i removed it from printer.cfg and added this:

[homing_override]

set_position_z:0   # needed to rise Z before to move
 
axes: xyz
gcode:
 g1 Z20
  {% set home_all = 'X' not in params and 'Y' not in params and 'Z' not in params %}

  {% if home_all or 'X' in params %}
   SENSORLESS_HOME_X
  {% endif %}
  
  {% if home_all or 'Y' in params %}
    SENSORLESS_HOME_Y
  {% endif %}

  {% if home_all or 'Z' in params %}
    G28 Z0
    G1 Z15
  {% endif %}

[gcode_macro SENSORLESS_HOME_X]
gcode:
    {% set HOME_CUR = 0.700 %}
    {% set driver_config = printer.configfile.settings['tmc2130 stepper_x'] %}
    {% set RUN_CUR = driver_config.run_current %}
    # Set current for sensorless homing
    SET_TMC_CURRENT STEPPER=stepper_x CURRENT={HOME_CUR}
    # Pause to ensure driver stall flag is clear
    G4 P2000
    # Home
    G28 X0
    # Move away
    G90
    G1 X50 F1200
    # Set current during print
    SET_TMC_CURRENT STEPPER=stepper_x CURRENT={RUN_CUR}



[gcode_macro SENSORLESS_HOME_Y]
gcode:
    {% set HOME_CUR = 0.700 %}
    {% set driver_config = printer.configfile.settings['tmc2130 stepper_y'] %}
    {% set RUN_CUR = driver_config.run_current %}
    # Set current for sensorless homing
    SET_TMC_CURRENT STEPPER=stepper_y CURRENT={HOME_CUR}
    # Pause to ensure driver stall flag is clear
    G4 P2000
    # Home
    G28 Y0
    # Move away
    G90
    G1 Y50 F1200
    # Set current during print
    SET_TMC_CURRENT STEPPER=stepper_y CURRENT={RUN_CUR}



Now all seem to work correctly BUT i can homing Z wherever i want without homing X and Y before and i don’t like it because sometime the glass on the bed is very close to bltouch so i prefer to do this task in a specific place … …
How can i fix this?
At least i would like to specify X and Y for homing Z

Thank you!

Could you please attach the klippy.log to your next post.
It was asked for in the template that you have deleted when you opened this thread.

Hello EddyMI3D, i apologize, i will attach it when i back home.
I didn’t attach it before because i haven’t hw issues, all works, i think it is only a config problem, however you’re right :slight_smile:

1 Like

klippy.log (38.6 KB)

Attached the log.
My printer is a Corexy.
Thank you

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.