fix for machines with z_min end-stops + probes#28350
fix for machines with z_min end-stops + probes#2835012oclocker wants to merge 1 commit intoMarlinFirmware:bugfix-2.1.xfrom
Conversation
fix for machines with z_min endstops + probes
|
will this work if Z home offset is not 0? |
yes |
|
no, it doesn't. home offset stops to have effect on Z |
|
Can you describe exactly what settings are you changing and having an issue with? GUI Z home offset through LCD, or #define Z offsets. Also what machine are you using? Please let me know... ALSO does your machine home using Endstop or Probe? The machine I am testing with homes with endstop, but uses probe. If your machine is homing with probe and not endstop, then the line of code I have submitted is not active for your machine and does not effect your machine. Also what version of marlin did you test with, the latest bugfix 2.1.x or 2.1.2.7 ? I tested it and found it to have no ill effect on offsets. Are you having a problem? If you are can you describe in more detail the problem you are having?... The line of code I submitted was "missing"... the effect is the same as "position.z -= probe.offset.z" when homing with a probe. (4 lines above in the code) which subtracts probe offset and makes net zero, except you are homing with endstop sensor, and nozzle touches instead of probe, nozzle touching the bed is net zero... So "position.z -= probe.offset.z" and "position.z = 0" both do not have any ill effect on the offsets... Offsets are applied after this code at a later time. Without this code fix, it is impossible for machines that require Z endstops to use a probe, the probe will "float" above the bed by the Z offset amount, because Z was never initialized during endstop homing. |
|
bugfix-2.1.x, specifically updated yesterday to test this. endstop and probe. Home offset is set via M206 Z, idk about screen. to test i probe reference point on bed with G30. Without change from this PR it works correctly and offset applied both to probed point and bed mesh. With change setting any home offset have no effect on point or mesh values. |
thanks, are you using UBL bed leveling or bilinear? I am assuming UBL since bilinear is what this fix is targeting. If you are using bilinear can you post your config.h file.... I will test with your config settings. |
|
bilinear. but choice of leveling system shouldn't affect G30. |
|
I will test this today and find the cause I suspect the problem may be "current_position[axis] = base_home_pos(axis);" is not working correctly, because |
|
It works but not always and very finicky. For one, i have to rescan mesh after any probe offset change and reboot printer for good measure or things get funky. |
|
Yes, re-scan of mesh after any probe offset change is because of the way marlin was written. That occurs because you are probing the mesh, but homing with endstop. the probe is subtracted from the mesh during creation, so if you change probe offset, you must re-make the mesh to apply it to the mesh. When homing with probe you obviously don't have to remake the mesh. I have several ideas on how to solve that, but have not coded it yet... I will examine your config today |
I am canceling this pull request, the problem is a bug in marlin, after setting Z probe offset, the machine must be rebooted before MESH can be created, otherwise mesh is built with Z offset NOT subtracted from the mesh. |
fix for machines with z_min endstops + probes
Description
fix for machines with z_min endstops + probes, which are independent of each other.
When using AUTO_BED_LEVELING_BILINEAR the Z homing must be zeroed before creating the bed meshes; otherwise the bed mesh never subtracts the Z offset during creation.
Currently the Z position is only zeroed when using a probe to home. Now it will be zeroed when using a mechanical endstop to home, or a probe to home. The fix is a single line of code.
Related Issues
fixes all these issues...
#27680
#22653
#21727
#21833