Cancel Print followed by G28 fails

Basic Information:

Printer Model: Voron 2.4 w/Tap and Sensorless homing
MCU / Printerboard: Octopusv1.1
klippy.log
klippy.log (7.9 MB)

Fill out above information and in all cases attach your klippy.log file. Pasting your printer.cfg is not needed
Be sure to check our Knowledge Base and in particular this and this post

Describe your issue:

I have Sensorless homing turned on with Voron tap, and after canceling a print I am seeing an error message
Changing monitoring state from “Cancelling” to “Operational”
[…]

Send: G28
Recv: // Run Current: 0.70A Hold Current: 0.70A
Recv: // Run Current: 0.70A Hold Current: 0.70A
Recv: // Run Current: 0.80A Hold Current: 0.80A
Recv: // Run Current: 0.80A Hold Current: 0.80A
Recv: // Run Current: 0.70A Hold Current: 0.70A
Recv: // Run Current: 0.70A Hold Current: 0.70A
Recv: // Run Current: 0.80A Hold Current: 0.80A
Recv: // Run Current: 0.80A Hold Current: 0.80A
Recv: !! Must home axis first: 288.554 295.432 3.884 [12744.843]
Recv: !! Must home axis first: 288.554 295.432 3.884 [12744.843]
Recv: ok

Which is failing to move to center of the bed, for Z homing

[homing_override]
axes: xyz
gcode:
{% set home_all = ‘X’ not in params and ‘Y’ not in params and ‘Z’ not in params %}
{% 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
G0 X175 Y175 F6600
G28 Z
G1 Z10
{% endif %}

Does it work with [homing_override} disabled?


Sometimes I ask myself, why not just use the good old fashioned G28 instead of these ultra sophisticated special macros?


At least you get in trouble with G28 Z an a completely un-homed printer (M84).

Then you try to move X and Y that are not homed before.

Its not possible to not having homing override disabled, I am using Sensorless homing, with Voron tap for TAP to home it needs to be moved after Y homes to somewhere on the bed plate. The center of the bed is the one of those places.

My initial reaction to this is it’s either some weird GCode mode problem with the move command after a print is canceled, or a bug.

You could try something along the lines of:

[gcode_macro G28]
rename_existing: G28.1
description: Fancy homing move
gcode:
  {% set x = 'X' in params %}
  {% set y = 'Y' in params %}
  {% set z = 'Z' in params %}
  {% set all = not (x or y or z) %}
  {% if all or x %}
    SET_TMC_CURRENT STEPPER=stepper_x CURRENT=0.7
  {% endif %}
  {% if all or y %}
    SET_TMC_CURRENT STEPPER=stepper_y CURRENT=0.7
  {% endif %}
  {% if all or z %}
    SET_TMC_CURRENT STEPPER=stepper_z CURRENT=0.7
  {% endif %}

  G28.1 {rawparams}

  {% if all or x %}
    SET_TMC_CURRENT STEPPER=stepper_x CURRENT={printer['tmc2209 stepper_x'].run_current}
  {% endif %}
  {% if all or y %}
    SET_TMC_CURRENT STEPPER=stepper_y CURRENT={printer['tmc2209 stepper_y'].run_current}
  {% endif %}
  {% if all or z %}
    SET_TMC_CURRENT STEPPER=stepper_z CURRENT={printer['tmc2209 stepper_z'].run_current}
  {% endif %}
1 Like

Thanks, I’ll give that a try to see if it helps. Only X and Y are actually sensor-less, so I would still need

{% if all or z %}
    G90
    G0 X175 Y175 F6600
    G28 Z
    G1 Z10
  {% endif %}

edit

Z uses Voron TAP which is a nozzle based probe for the z axis,