diff --git a/macros/base/probing/dockable_probe.cfg b/macros/base/probing/dockable_probe.cfg index d3739b7e7..42659ca21 100644 --- a/macros/base/probing/dockable_probe.cfg +++ b/macros/base/probing/dockable_probe.cfg @@ -211,6 +211,9 @@ gcode: {% set probe_servo_enabled = printer["gcode_macro _USER_VARIABLES"].probe_servo_enabled %} + # Probe stow height + {% set probe_stow_z_height = printer["gcode_macro _USER_VARIABLES"].probe_stow_z_height|default(None) %} + _ENTRY_POINT FUNCTION=DOCK_PROBE @@ -247,7 +250,7 @@ gcode: {% set saved_decel = printer.toolhead.max_accel_to_decel %} M204 S{probe_dock_accel} - # Probe entry location + # Move to probe entry location _PROBE_MOVE_TO LOCATION={probe_before_dock_position} DISTANCE={probe_move_dock_length} SPEED={travel_speed} # Deploy dock using the servo (if available) @@ -255,9 +258,14 @@ gcode: _SERVO_DEPLOY ITEM="probe" {% endif %} - # Pickup from Probe location + # Move probe into dock _PROBE_MOVE_TO LOCATION='dock' SPEED={probe_dock_speed} + # Move probe to stow z height if defined + {% if probe_stow_z_height is not none %} + G0 Z{probe_stow_z_height} F{z_drop_speed} + {% endif %} + # Get detach probe _PROBE_MOVE_TO LOCATION={probe_after_dock_position} DISTANCE={probe_move_dock_length} SPEED={probe_dock_speed} diff --git a/macros/base/probing/overides/dockable_probe_overides.cfg b/macros/base/probing/overides/dockable_probe_overides.cfg index 8eb4ae744..e2f574881 100644 --- a/macros/base/probing/overides/dockable_probe_overides.cfg +++ b/macros/base/probing/overides/dockable_probe_overides.cfg @@ -46,6 +46,10 @@ gcode: %}{'%s=%s ' % (p, params[p])}{% endfor %} + # Save nozzle location before dock + M400 + _ENTRY_POINT FUNCTION=PROBE_CALIBRATE + DEACTIVATE_PROBE # Restore nozzle location again at the end @@ -95,6 +99,10 @@ gcode: %}{'%s=%s ' % (p, params[p])}{% endfor %} + # Save nozzle location before dock + M400 + _ENTRY_POINT FUNCTION=PROBE_CALIBRATE + DEACTIVATE_PROBE # Restore nozzle location again at the end diff --git a/user_templates/variables.cfg b/user_templates/variables.cfg index c6f0468ed..74cecfad6 100644 --- a/user_templates/variables.cfg +++ b/user_templates/variables.cfg @@ -84,6 +84,11 @@ variable_max_bed_xy: 9999, 9999 ## Minimum safe Z height to attach/detach probe variable_probe_min_z_travel: 20 +## Z height to move to when detaching probe +## Setting to 'None' or removing this variable will prevent any +## change in z position when detaching the probe +variable_probe_stow_z_height: None + ## Position of the probe dock variable_probe_dock_location_xy: -1, -1