Skip to content

Commit

Permalink
Add support for dockable probes with separate retainer (#401)
Browse files Browse the repository at this point in the history
  • Loading branch information
tolson4 authored Feb 22, 2024
1 parent ed5ff00 commit 4dd8a61
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
12 changes: 10 additions & 2 deletions macros/base/probing/dockable_probe.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -247,17 +250,22 @@ 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)
{% if probe_servo_enabled %}
_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}

Expand Down
8 changes: 8 additions & 0 deletions macros/base/probing/overides/dockable_probe_overides.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions user_templates/variables.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 4dd8a61

Please sign in to comment.