Skip to content

Commit a040271

Browse files
swissnorpthinkyheadsjasonsmith
authored andcommitted
Allow positive Z nozzle to probe offset (MarlinFirmware#20344)
* Allow a positive value for z offset from nozzle to probe without sanity checks * Simplify menu_probe_offset.cpp (HOMING_Z_WITH_PROBE) * Add some more explanation to Configuration Files * Raise after probe_at_point as if homed Co-authored-by: Scott Lahteine <[email protected]> Co-authored-by: Jason Smith <[email protected]>
1 parent 18270ee commit a040271

4 files changed

Lines changed: 18 additions & 13 deletions

File tree

Marlin/Configuration.h

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -954,10 +954,20 @@
954954
/**
955955
* Nozzle-to-Probe offsets { X, Y, Z }
956956
*
957-
* - Use a caliper or ruler to measure the distance from the tip of
957+
* X and Y offset
958+
* Use a caliper or ruler to measure the distance from the tip of
958959
* the Nozzle to the center-point of the Probe in the X and Y axes.
960+
*
961+
* Z offset
959962
* - For the Z offset use your best known value and adjust at runtime.
960-
* - Probe Offsets can be tuned at runtime with 'M851', LCD menus, babystepping, etc.
963+
* - Common probes trigger below the nozzle and have negative values for Z offset.
964+
* - Probes triggering above the nozzle height are uncommon but do exist. When using
965+
* probes such as this, carefully set Z_CLEARANCE_DEPLOY_PROBE and Z_CLEARANCE_BETWEEN_PROBES
966+
* to avoid collisions during probing.
967+
*
968+
* Tune and Adjust
969+
* - Probe Offsets can be tuned at runtime with 'M851', LCD menus, babystepping, etc.
970+
* - PROBE_OFFSET_WIZARD (configuration_adv.h) can be used for setting the Z offset.
961971
*
962972
* Assuming the typical work area orientation:
963973
* - Probe to RIGHT of the Nozzle has a Positive X offset

Marlin/Configuration_adv.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,8 @@
10841084
#if ENABLED(PROBE_OFFSET_WIZARD)
10851085
//
10861086
// Enable to init the Probe Z-Offset when starting the Wizard.
1087-
// Use the estimated nozzle-to-probe Z offset, plus a little more.
1087+
// Use a height slightly above the estimated nozzle-to-probe Z offset.
1088+
// For example, with an offset of -5, consider a starting height of -4.
10881089
//
10891090
//#define PROBE_OFFSET_WIZARD_START_Z -4.0
10901091

Marlin/src/inc/SanityCheck.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,12 +1357,6 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
13571357
static_assert(sanity_nozzle_to_probe_offset.x == 0 && sanity_nozzle_to_probe_offset.y == 0,
13581358
"NOZZLE_AS_PROBE requires the XY offsets in NOZZLE_TO_PROBE_OFFSET to both be 0.");
13591359
#else
1360-
static_assert(sanity_nozzle_to_probe_offset.z <= 0.25,
1361-
"Are you sure your Probe triggers above the nozzle? Set a negative Z value in the NOZZLE_TO_PROBE_OFFSET.");
1362-
#ifdef PROBE_OFFSET_WIZARD_START_Z
1363-
static_assert(PROBE_OFFSET_WIZARD_START_Z <= 0.25,
1364-
"Are you sure your Probe triggers above the nozzle? Set a negative value for PROBE_OFFSET_WIZARD_START_Z.");
1365-
#endif
13661360
static_assert(PROBING_MARGIN >= 0, "PROBING_MARGIN must be >= 0.");
13671361
static_assert(PROBING_MARGIN_BACK >= 0, "PROBING_MARGIN_BACK must be >= 0.");
13681362
static_assert(PROBING_MARGIN_FRONT >= 0, "PROBING_MARGIN_FRONT must be >= 0.");

Marlin/src/lcd/menu/menu_probe_offset.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,8 +107,8 @@ void probe_offset_wizard_menu() {
107107

108108
ACTION_ITEM(MSG_BUTTON_CANCEL, []{
109109
set_offset_and_go_back(z_offset_backup);
110-
// If wizard-homing was done by probe with with PROBE_OFFSET_WIZARD_START_Z
111-
#if EITHER(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN, USE_PROBE_FOR_Z_HOMING) && defined(PROBE_OFFSET_WIZARD_START_Z)
110+
// If wizard-homing was done by probe with PROBE_OFFSET_WIZARD_START_Z
111+
#if HOMING_Z_WITH_PROBE && defined(PROBE_OFFSET_WIZARD_START_Z)
112112
set_axis_never_homed(Z_AXIS); // On cancel the Z position needs correction
113113
queue.inject_P(PSTR("G28Z"));
114114
#else // Otherwise do a Z clearance move like after Homing
@@ -122,7 +122,7 @@ void probe_offset_wizard_menu() {
122122
void prepare_for_probe_offset_wizard() {
123123
if (ui.wait_for_move) return;
124124

125-
#if defined(PROBE_OFFSET_WIZARD_XY_POS) || NONE(Z_MIN_PROBE_USES_Z_MIN_ENDSTOP_PIN, USE_PROBE_FOR_Z_HOMING)
125+
#if defined(PROBE_OFFSET_WIZARD_XY_POS) || !HOMING_Z_WITH_PROBE
126126
if (ui.should_draw()) MenuItem_static::draw(1, GET_TEXT(MSG_PROBE_WIZARD_PROBING));
127127

128128
#ifndef PROBE_OFFSET_WIZARD_XY_POS
@@ -133,7 +133,7 @@ void prepare_for_probe_offset_wizard() {
133133

134134
// Probe for Z reference
135135
ui.wait_for_move = true;
136-
z_offset_ref = probe.probe_at_point(wizard_pos, PROBE_PT_STOW, 0, true);
136+
z_offset_ref = probe.probe_at_point(wizard_pos, PROBE_PT_RAISE, 0, true);
137137
ui.wait_for_move = false;
138138

139139
#endif

0 commit comments

Comments
 (0)