Frix-x / klippain

Generic Klipper configuration for 3D printers
GNU General Public License v3.0
807 stars 215 forks source link

Support for dockable probes with fixed z-height #612

Open jannwieland opened 3 weeks ago

jannwieland commented 3 weeks ago

Describe the feature or hardware support you'd like

I am using a dockable probe at a fixed z-height. Currently there is no option to for the _ATTACH_PROBE and _DOCK_PROBE macros to use a specific z-height.

PXL_20240622_110337885

In the current state, the macros fail if printer.toolhead.position.z > probe_min_z_travel since the toolhead misses the dock.

Additional context or information

Possible Solution:

Add a user variable like probe_z_fixed and change the probe_min_z_travel check in both _ATTACH_PROBE and _DOCK_PROBE to something like this:

# Move to safe Z
{% if (printer.toolhead.position.z < probe_min_z_travel or probe_z_fixed) %}
    {% set safe_z = probe_min_z_travel - printer['gcode_move'].homing_origin.z %}
    {% if verbose %}
        { action_respond_info("Moving to a safe Z distance") }
    {% endif %}
    G0 Z{safe_z} F{z_drop_speed}
{% endif %}
Surion79 commented 3 weeks ago

question: how does the z probe work in this case when you have unhomed Z? do you use another z endstop? do i see it on the right?

i do wonder if this is a good idea to add possible another variable that might conflict with other settings. But I think that might be something for @Frix-x

jannwieland commented 3 weeks ago

Sorry for the late reply. Yes it's on the right. I use the standard z-endstop from the Voron 2.4 kit for homing and the klipper_z_calibration.

I've recently added a blobifier to my setup and had to relocate the klicky probe.