How I solved M206 and fixed failing probes
After meticulous measuring and probing it turns out that my nozzle is at Z:161, even with the E3D replacement nozzle sticking out 1mm lower than the original? Which made the Z error (with original M206 Z-1) a total of 3mm! So, either my Mini is completely out of spec, or the LULZBOT_STANDARD_Z_MAX_POS 159 is way off to start with? This 3mm offset explains why the probe failed with M206 Z-1.
Using M206 Z2 fixes the probe, but leaves the internal z-position 2mm too high (0=-2) after probe and applying z-probe-offset. I’m glad I didn’t try a print using that firmware!!
It turns out run_z_probe() needs correction for home-offset, not only when DELTA is enabled, but also when HAS_HOME_OFFSET is true:
diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp
index a58bb33c..38a66618 100644
--- a/Marlin/Marlin_main.cpp
+++ b/Marlin/Marlin_main.cpp
@@ -2264,7 +2264,7 @@ static void clean_up_after_endstop_or_probe_move() {
float z = LOGICAL_Z_POSITION(Z_CLEARANCE_BETWEEN_PROBES);
if (zprobe_zoffset < 0) z -= zprobe_zoffset;
- #if ENABLED(DELTA)
+ #if HAS_HOME_OFFSET || ENABLED(DELTA)
z -= home_offset[Z_AXIS]; // Account for delta height adjustment
#endif
@@ -2292,7 +2292,7 @@ static void clean_up_after_endstop_or_probe_move() {
}
#endif
return RAW_CURRENT_POSITION(Z) + zprobe_zoffset
- #if ENABLED(DELTA)
+ #if HAS_HOME_OFFSET || ENABLED(DELTA)
+ home_offset[Z_AXIS] // Account for delta height adjustment
#endif
;
After this fix and applying M206 Z2, G28 correctly(?) sets my nozzle at z:161, G29 probes correctly within the original LULZBOT_BED_PROBE_FAIL -2 limit and now prints it’s first LIN_ADVANCE (k=0) test print.
update: This doesn’t make G29 fail when I hold a paper between nozzle and washer, although Z was -2.430 for all 3 probes? Back to the drawing board.
update2: The above problem comes from do_probe_move(), translating LULZBOT_BED_PROBE_MIN (-3) to -1 because z is transformed via LOGICAL_Z_POSITION, which is nonsense because z is already corrected for home_offset by virtue of M206 or G92?
So, when replacing the do_blocking_move_to_z line with
do_blocking_move_to_z(z, MMM_TO_MMS(fr_mm_m));
And setting the lower limits of LULZBOT_PROBE_Z_WITH_REWIPE to
#define LULZBOT_BED_PROBE_MIN -2 // Limit on pushing into the bed
#define LULZBOT_BED_PROBE_FAIL -1 // At what point is a failure detected
Which should be plenty of headroom for a carefully calibrated Mini. G29 now succesfully probes on a clean nozzle and fails on no contact, but only budges the bed 2mm, which is more than enough in my humble opinion.