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.27k stars 19.23k forks source link

Z_MIN_POS not observed on auto home #11106

Closed alekc closed 6 years ago

alekc commented 6 years ago

Description

New user (to printing) here, so it's possible that I am missing something obvious, but still. I have recently bought Anet A6, and I am trying to apply z-index offset in order to be able to place a glass sheet on the hotbed, but it looks like Z_MIN_POS is ignored by printer.

Steps to Reproduce

I've cloned 1.1x-bugfix branch, used configuration from example_configurations\Anet\A6, and applied following changes:

PROBE_MANUALLY
LCD_BED_LEVELING
MESH_BED_LEVELING

When auto homing extruder is being placed in the center of the hotbed, and the point is touching the plate. So I applied #define Z_MIN_POS 3 to the firmware, flashed it, but noticed no change in printer behavior, with display showing x:111 y:111 z:3

Just to be sure I've tried with #define Z_MIN_POS 10, same issue. When auto homing, nozzle stops in the same position and display reports x:111 y:111 z:10 which is wrong.

If I disable Z_SAFE_HOMING , following coordinates are used

// ANET A6, X0/Y0 0 front left bed edge :
#define X_BED_SIZE 222
#define Y_BED_SIZE 222
#define X_MIN_POS -3
#define Y_MIN_POS -5
#define Z_MIN_POS 0
#define Z_MAX_POS 230

with nozzle being parked outside of the hot bed. If z_min_pos is equal to 0, and I move z axis by 10 mm, nozzle's position is much higher than the hotbed's, so when printer reported being in z 10 with Z_MIN_POS =10 was obviously wrong.

My concern is that if I leave everything as it is and place the glass on hotbed, then it will be crashed with nozzle going all the way down. Plus bed levelling (If I am not wrong) is limited to max 2mm of difference.

Am I missing something here? Thanks.

GMagician commented 6 years ago

try with m502 and m500

gloomyandy commented 6 years ago

I don't think you can do what you are trying to do here. If you have a mechanical endstop it doesn't really make sense to try and use software to move the z home position higher. Your system will still have to move the nozzle gantry to the lower point to trigger the endstop (at which point it will crash into the glass). It is almost certainly better to move the endstop so that it triggers above the bed (when the glass plate is in place), you should then be able to use some form of zoffset setting to fine tune things so that your zero point is at the correct height.

alekc commented 6 years ago

So just to be clear, with a mechanical endstop the algorithm is move z down till you reach the mechanical stop, and then read z_min_pos and assume that you are at it (that's why it shows it on display). If that's indeed the case docs should be a bit clearer otherwise first time user will bang their heads for a long time.

gloomyandy commented 6 years ago

I'm not sure what you mean by the above, but it is pretty simple if you think about it. You must have your mechanical endstop setup so that you touch it before the nozzle hits the bed. If you don't there is no way to actually trigger the endstop! Ideally you position is so that your nozzle is just touching the bed when the endstop is triggered. This basically means that you can't really use a software offset when using a mechanical endstop. Although in theory you could set the endstop above the bed, doing so is not a good idea (at least for the typical switch type endstops) as if you do this then you will in effect have to pass the endstop to reach the bed.

So the easy way to set this up is....

  1. Adjust your spring based bed so that all of the springs are compressed to some degree.
  2. Set your Z_MIN_POS to 0
  3. Move the endstop so that it triggers with the nozzle just above the bed and fix the endstop in place.
  4. Perform a home operation and check that the nozzle does not hit the bed.
  5. Jog the Z value until it reads 0, the nozzle should be slightly above the bed.
  6. Adjust the bed so it is level and the nozzle is either just touching or a papers width above the bed (depending upon how you want to set things up).
  7. All done.

I'm sure there are other ways of doing it, but the above should give you a good result.

alekc commented 6 years ago

Yeah, I didn't take in consideration that printer has to hit the mechanical endstop in order to know where it is, so it all makes sense if viewed from that perspective.

I think I will add an extra 3mm padding to the z axis so I won't have to move hardware switch anywhere (not thrilled about idea of drilling extra holes in plastic frame).

Thanks for suggestion, closing this one.

github-actions[bot] commented 4 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.