MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.14k stars 19.2k forks source link

Allen Key Probe lifted twice on Delta Auto Bed Leveling #2268

Closed schlotzz closed 9 years ago

schlotzz commented 9 years ago

Hi folks,

I'm very new to GitHub and this is my first opened issue, so please be kind ;-)

Using a Kossel Mini for about 1.5 years I tried switching to the latest Marlin Development version (last commit 0c71bdd14ff3647198a347c9a27f43eb295d2e74). Having configured the delta printer for using AutoBedLeveling with an allen key I was wondering, why the probe keeps being lifted twice after each bed contact. It looks like Z_RAISE_BETWEEN_PROBINGS is being applied twice.

With my rusty C++ knowledge I tracked it down to the following:

Z_RAISE_BETWEEN_PROBINGS applied the first time

inline void gcode_G29() {
...
z_before = probePointCounter ? Z_RAISE_BETWEEN_PROBINGS + current_position[Z_AXIS] : Z_RAISE_BEFORE_PROBING;
...
}

Z_RAISE_BETWEEN_PROBINGS applied the second time

 static float probe_pt(...) {
...

    #if Z_RAISE_BETWEEN_PROBINGS > 0
      if (probe_action == ProbeStay) {
        do_blocking_move_to(current_position[X_AXIS], current_position[Y_AXIS], current_position[Z_AXIS] + Z_RAISE_BETWEEN_PROBINGS); // this also updates current_position
        st_synchronize();
      }
    #endif
...
}

Removing the second block it seems to function right. Maybe this block shouldn't be applied or should only be used for non-deltas?

Looking forward hearing from you.

thinkyhead commented 9 years ago

@schlotzz I think you're right. I noticed this a few weeks ago and apparently forgot to patch it. #2281 should do the trick!

Wackerbarth commented 9 years ago

2281 was merged.

Can we close this one?

schlotzz commented 9 years ago

Yes, bug seems fixed. Thanks for merging.

github-actions[bot] commented 2 years ago

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.