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

AUTO_BED_LEVELING not using correct first point #1939

Closed fitch22 closed 9 years ago

fitch22 commented 9 years ago

This is from recent build, source dated today. Using Printrboard on Simple Metal that has Y endstop at max travel.

Executing G29 just uses what appears to be the last position as its first point, then moves the correct delta amount to the 2nd and 3rd points, but the absolute coordinates are off since the first point is off. In my case, the 3 points are supposed to be (25, 140) (25, 10) and (125, 10). It looks like it is instead using (25, 150), (25, 20) and (125, 20). This worked as of my previous build with source dated 4/4/2015.

thinkyhead commented 9 years ago

Does the firmware think it's at a different point before it starts G29, or does it correctly know the current coordinate? Does G28 work correctly for you? The behavior of G28 XYZ should be the same as G28 but G28 X0 Y0 Z0 will screw up a delta, or any machine with max endstops. For delta machines, the correct syntax would be G28 X0 Y0 Z180 (for a machine with Z_HOME_POS set to 180). At least, that's the idea. Can you confirm that G28 works as I describe on your machine?

fitch22 commented 9 years ago

@thinkyhead, This bug showed up and is fixed on what code I am using by #1945. I think it was all related to homing Y where my endstop is at max Y but the position was reset to 0. The first point of the auto level wanted it to move -10 in Y and it could not. Subsequent moves for the other 2 points must have been relative. I believe it is fixed with #1945.

thinkyhead commented 9 years ago

1965 goes even further – All values to XYZ are ignored, as they are just flags to home a certain axis. This is consistent with the documentation for G28 on the RepRap wiki. So, give the latest code a try and see if it's doing any better!

fitch22 commented 9 years ago

I have confirmed that #1965 fixes my original issue (so did #1945). I have changed all startup code to use "G28 X Y" with no positions. All is good. Hope it is OK to close this issue. Thanks.

thinkyhead commented 9 years ago

:hamster:

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.