Internal error on command:"QUAD_GANTRY_LEVEL" with Voron Tap Probe

Basic Information:

Printer Model: Voron 2.4r2 with Tap probe.
MCU / Printerboard: Octopus pro with EBB36 canbus board.
klippy.log

Fill out above information and in all cases attach your klippy.log file. Pasting your printer.cfg is not needed
When pasting code or config snippets use the code tags </> in the menu above

Describe your issue:

I get this error when I do QUAD_GANTRY_LEVEL and the printer just probed 4 spots and trying to start adjust 4 z steppers.

Internal error on command:“QUAD_GANTRY_LEVEL”
Once the underlying issue is corrected, use the
“FIRMWARE_RESTART” command to reset the firmware, reload the
config, and restart the host software.
Printer is shutdown.

It was OK before I upgraded to Tap probe. Previously I have used euclid probe. Attached klippy.log and moonraker.log. Do anybody have any idea why is causing the problem? Thanks for your help.

klippy.log (295.6 KB)
moonraker.log (37.7 KB)
voron_cfg.zip (44.6 KB)

I also uploaded my config files just in case.

This sounds really wired:

I did it, but didn’t help. I also clean installed bullseye (64bit lite) and installed klipper using kiauh. Still having the same error :frowning:

What about a clean config, IE start from a generic Voron V2.4 config and add only the minimum needed to get the machine going with your Canbus Tool head?
No sub files just what is needed

It didn’t help, either. What I ended up with is that I changed quad_gantry_level to z_tilt as I have no problem with my trident. It works now :slight_smile:

This resolution is so funny, cause quad_gantry_level eventually calls z_tilt inside the python code.

I found the actual reason. In the python code at 43rd line of klippy/extras/z_tilt.py:

        # Move each z stepper (sorted from lowest to highest) until they match
        positions = [(-a, s) for a, s in zip(adjustments, self.z_steppers)]
        positions.sort()

if the adjustment values, i.e., -a, in the tuple are coincidently the same, the second element of the tuple, i.e., s which is MCU_stepper object is used for sorting. That is causing the error. So, the code should change to

        # Move each z stepper (sorted from lowest to highest) until they match
        positions = [(-a, s) for a, s in zip(adjustments, self.z_steppers)]
        positions.sort(key=lambda k: k[0])

Also I found a mistake in my config after changing from euclid to tap probe. I put 4 x,y tuples in gantry_corners in [quad_gantry_level] section. That might have been a root cause.

@koconnor I think you should look at this.

Thanks

Thanks. Should be fixed now (commit 86acee6e).

-Kevin

Thanks, hope it was ok to ping you.

That’s fine. Thanks.

-Kevin