Browse Source

Allow positive Z nozzle to probe offset (#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 <thinkyhead@users.noreply.github.com>
Co-authored-by: Jason Smith <jason.inet@gmail.com>
swissnorp 4 years ago
parent
commit
edb2a83e71
No account linked to committer's email address

+ 12
- 2
Marlin/Configuration.h View File

954
 /**
954
 /**
955
  * Nozzle-to-Probe offsets { X, Y, Z }
955
  * Nozzle-to-Probe offsets { X, Y, Z }
956
  *
956
  *
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
958
  *   the Nozzle to the center-point of the Probe in the X and Y axes.
959
  *   the Nozzle to the center-point of the Probe in the X and Y axes.
960
+ * 
961
+ * Z offset
959
  * - For the Z offset use your best known value and adjust at runtime.
962
  * - 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.
961
  *
971
  *
962
  * Assuming the typical work area orientation:
972
  * Assuming the typical work area orientation:
963
  *  - Probe to RIGHT of the Nozzle has a Positive X offset
973
  *  - Probe to RIGHT of the Nozzle has a Positive X offset

+ 2
- 1
Marlin/Configuration_adv.h View File

1084
     #if ENABLED(PROBE_OFFSET_WIZARD)
1084
     #if ENABLED(PROBE_OFFSET_WIZARD)
1085
       //
1085
       //
1086
       // Enable to init the Probe Z-Offset when starting the Wizard.
1086
       // 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.
1088
       //
1089
       //
1089
       //#define PROBE_OFFSET_WIZARD_START_Z -4.0
1090
       //#define PROBE_OFFSET_WIZARD_START_Z -4.0
1090
 
1091
 

+ 0
- 6
Marlin/src/inc/SanityCheck.h View File

1357
     static_assert(sanity_nozzle_to_probe_offset.x == 0 && sanity_nozzle_to_probe_offset.y == 0,
1357
     static_assert(sanity_nozzle_to_probe_offset.x == 0 && sanity_nozzle_to_probe_offset.y == 0,
1358
                   "NOZZLE_AS_PROBE requires the XY offsets in NOZZLE_TO_PROBE_OFFSET to both be 0.");
1358
                   "NOZZLE_AS_PROBE requires the XY offsets in NOZZLE_TO_PROBE_OFFSET to both be 0.");
1359
   #else
1359
   #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
1366
     static_assert(PROBING_MARGIN       >= 0, "PROBING_MARGIN must be >= 0.");
1360
     static_assert(PROBING_MARGIN       >= 0, "PROBING_MARGIN must be >= 0.");
1367
     static_assert(PROBING_MARGIN_BACK  >= 0, "PROBING_MARGIN_BACK must be >= 0.");
1361
     static_assert(PROBING_MARGIN_BACK  >= 0, "PROBING_MARGIN_BACK must be >= 0.");
1368
     static_assert(PROBING_MARGIN_FRONT >= 0, "PROBING_MARGIN_FRONT must be >= 0.");
1362
     static_assert(PROBING_MARGIN_FRONT >= 0, "PROBING_MARGIN_FRONT must be >= 0.");

+ 4
- 4
Marlin/src/lcd/menu/menu_probe_offset.cpp View File

107
 
107
 
108
   ACTION_ITEM(MSG_BUTTON_CANCEL, []{
108
   ACTION_ITEM(MSG_BUTTON_CANCEL, []{
109
     set_offset_and_go_back(z_offset_backup);
109
     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)
112
       set_axis_never_homed(Z_AXIS); // On cancel the Z position needs correction
112
       set_axis_never_homed(Z_AXIS); // On cancel the Z position needs correction
113
       queue.inject_P(PSTR("G28Z"));
113
       queue.inject_P(PSTR("G28Z"));
114
     #else // Otherwise do a Z clearance move like after Homing
114
     #else // Otherwise do a Z clearance move like after Homing
122
 void prepare_for_probe_offset_wizard() {
122
 void prepare_for_probe_offset_wizard() {
123
   if (ui.wait_for_move) return;
123
   if (ui.wait_for_move) return;
124
 
124
 
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
126
     if (ui.should_draw()) MenuItem_static::draw(1, GET_TEXT(MSG_PROBE_WIZARD_PROBING));
126
     if (ui.should_draw()) MenuItem_static::draw(1, GET_TEXT(MSG_PROBE_WIZARD_PROBING));
127
 
127
 
128
     #ifndef PROBE_OFFSET_WIZARD_XY_POS
128
     #ifndef PROBE_OFFSET_WIZARD_XY_POS
133
 
133
 
134
     // Probe for Z reference
134
     // Probe for Z reference
135
     ui.wait_for_move = true;
135
     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);
137
     ui.wait_for_move = false;
137
     ui.wait_for_move = false;
138
 
138
 
139
   #endif
139
   #endif

Loading…
Cancel
Save