Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for dockable probes with separate retainer #401

Merged
merged 2 commits into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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