-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Incorrect offset applied to Bed level mesh when using a fixed Home Switch/Z stop and seperate level probe. #27680
Comments
Maker-Paul, Why are you using a mechanical limit switch for the Z-axis when your Z-probe can perform the same function? |
Because a proximity probe though good for creating a level mesh varies
with environmental changes and takes up to 30 minutes to stabilize after
switch on (as it warms up). So its good for creating a level mesh but not
good for setting a Z zero reference. A fixed Z stop will give a perfectly
stable and repeatable Z zero reference but does nothing else. Horses for
courses. As the machine can support both I prefer to have a dedicated
sensor doing the job its best at and not having to accept a compromise. I
can use my machine day after day simply by telling it to print without
having to redo Z offsets. In fact I won't have to enter a Z offset at all
(if the bug is fixed).
…On Mon, 10 Feb 2025, 19:12 borland1, ***@***.***> wrote:
Maker-Paul,
Why are you using a mechanical limit switch for the Z-axis when your
Z-probe can perform the same function?
—
Reply to this email directly, view it on GitHub
<#27680 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/BMBPEPK5RXA3TYC5I5PDMST2PD23FAVCNFSM6AAAAABWY6AOMOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMNBYHE4TEMJXHA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I have successfully edited G29.cpp to correct the error at least for ABL Bilinear mesh. It only required 4 lines of code and 1 line edited to make it work. I have edited config.h by adding a new compiler directive to enable my changes called USE_PROBE_FOR_MESH_REF. As I don't use git and have definitely not extensively tested it, I am not going to be so presumptuous as to try and submit the code officially as a fix. But I am more than happy to let any Marlin developer have the file as it will at least provide a method. My printer now does perfect first layers every time simply by selecting the file to print. Homing is part of the print file custom Gcode and restore level after homing is enabled in config.h. Re-leveling is only required after physical adjustments and as the frame mounted Z end-stop/Homing switch provides a real Z zero homing point there is no need of any probe z offset or offset wizards. I am using an adjustable mount for the frame mounted Z end-stop/Homing switch which allows better than 0.01mm adjustments for setting the switch physical position so the nozzle just pinches a piece of paper when homing. Assisted tramming still works as it should.. |
Hi Borland1. I do feel a bit like I'm having to defend this. I have to disagree with almost every assertion you have made but I'm glad at the same time that your interested. Even a cheap mechanical limit switch can certainly achieve a repeatability better that 0.01mm. Its the repeatability that matters in this application because what we are interested in is the relative position to other components in this case the nozzle. So it doesn't matter whether the measurement is mm, inches, standard cabbages or a piece of paper. As I have already said my switch is mounted on an adjustable mount that lets me adjust its position relative to the bed just by turning a thumb wheel with a resolution of 0.5mm per revolution. It takes a minute to literally dial in the Home position using the paper pinch test. Once it is set it stays set day in day out. Of course I could use a higher quality switch or optical trigger that would be highly accurate, is easily available and also cheap but I haven't found that to be necessary. As for the mechanical accuracy of lead screws and micro stepping resolution, these are both outside the remit of this modification or the bugfix and have been addressed separately on my machines. A proximity sensor which may have a higher resolution, which is what I think your confusing with accuracy., but has appalling long term repeatability. My proximity sensors trigger point varies by up to 2mm depending on temperature. That doesn't matter for comparative measurements where all the reading are gathered within a short enough time that the environment cant have significantly changed. A proximity sensor will only give accurate repeatability once it has settled but not during the first half hour of being switched on and not from day to day.. So creating a mesh is fine, but will my home position be the same tomorrow morning as it is at 4oc in the afternoon. I can guarantee it won't be. That is why so many people constantly have to reset the Z offset every time before they start a new print. As my firmware modification/bug fix means the unwanted fixed Z/Home switch to probe offset is measured as the first thing a bed level routine does the unwanted offset is taken off the mesh values with the same accuracy as the mesh measurements themselves. the result is that my machines home position on the status screen with the mesh applied is Z 0. The produced mesh has values both slightly above and slightly below zero with a range of about 0.2 mm as would be expected from a PEI sheet on a magnetic base with a warped hot plate. The fix doesn't change the relative values of the mesh points to each other as the same value is applied to all points. All it does is move the mesh down to the zero plane. It is not easier to drill down menu options to adjust a Z offset than it is to move a thumb wheel by 1 notch. especially when having the homing switch set properly eliminates the need to ever have to set a Z offset either with the wizard or any other method allowing the menu options to be simplified and the status screen to show the actual Z value. I have enabled a Bed Z menu option to allow the Fixed Z stop/Home switch to be deliberately set a little above the bed if wanted. the extra clearance allows homing and bed leveling to keep the nozzle clear of the bed even if there is a bit of set oozed plastic. the bed Z setting does the same as it does when there is only a fixed Z stop. As it is an offset between the fixed Z stop and the bed it doesn't change with environmental changes. In practice I haven't found the Bed Z option necessary as setting the Fixed Z stop using the paper pinch test works perfectly well and I'm pretty good at making sure my nozzle is clean before I home or level. I have of course carried out many first layer mesh test prints. I am now at the point where I can deliberately adjust my bed level, set the home position, run a bed level and do a mesh test print without any further adjustments and its perfect every time, even with the bed badly out of tram. I have three XY2 Pros all highly modified including bed springs. I started experimenting with using separate Z stop and probe 5 years ago but because of the restrictions of proprietary firmware the only way I could implement it was with a physical switch to change between them. The result was stable machines that would work for weeks without having to mess with them but they were not easy to set up. This latest machine (I picked up two wrecks for £30 on the local buy and sell) is as easy to use as the most expensive consumer grade machines (Bamboo Labs) Easy to set up! Stays set! Thanks to Marlin finally bringing it together (all be it I have had to bug fix it myself at the moment) This set up is as close as it gets to true automatic bed leveling and much better than the Sunlu I have with a BL touch Pros Pros and cons of other alternatives Bed distance sensor :- (This is the future) Should be environmentally stable but I haven't tested it. Still requires a Z offset but should stay set. compensates for state of the bed in real time so no mesh, requires a capable fast mother board, expensive at the moment, complex to implement as a non stock upgrade. I really do feel I have the best easily implemented solution to a problem that plagues so many 3D printer users. Its affordable easy to install and simplifies the operation of existing machines even for non enthusiast operators. |
Did you test the latest
bugfix-2.1.x
code?Yes, and the problem still exists.
Bug Description
When using a fixed stop for homing connected to default Z min and a probe connected to the default separate probe connector.
The bed level mesh is created relative to the fixed Z0 and therefore an unwanted offset between the fixed Z0 and the probe Z0 is added to the mesh values. This offset can be compensated for by setting a probe Z offset, but this offset is then inappropriately applied to the fixed Z stop/Homing switch when homing and therefore has to be removed for subsequent homing. Z values on the status screen are therefore very confusing.
I have included modified files in the upload section below as a possible fix. The readme file details the line numbers in the files where code has been added or changed. Hope this helps. Last upload of updated files 20th Feb 2025.
Bug Timeline
Not sure
Expected behavior
The probe should be used to establish the Probe Z0 reference for the purpose of creating the mesh points (the same as when only a probe exists and has been used to home)
Optional When a fixed Z stop/Home switch is used a probe offset is not needed as the nozzle offset is actually relative to the fixed stop so the menu option setting a probe Z offset could be removed and it would be more logical to enable the Z bed offset that is present in the menu when only a fixed stop is used.
Please note using just a Z stop or just using a probe both work as expected.
Actual behavior
I have to find the offset between the fixed Z Stop/Home switch and the Probe Z0. Then enter that value as a Z probe offset before I run a bed level. store the mesh and set the probe Z offset back to 0, then home the machine as a workaround way to set it up. I have enable bed leveling after homing enabled.
Because a Fixed Z stop/Home switch to probe Z0 is not a recognized offset the numbers can get very confusing.
Steps to Reproduce
Version of Marlin Firmware
Latest Bugfix 2.1.x
Printer model
Tronxy XY2 Pro
Electronics
Stock
LCD/Controller
Stock
Other add-ons
No response
Bed Leveling
ABL Bilinear mesh
Your Slicer
Prusa Slicer
Host Software
None
Don't forget to include
Configuration.h
andConfiguration_adv.h
.Additional information & file uploads
Configuration.zip
PaulsBugfix.zip
Readme.txt
The text was updated successfully, but these errors were encountered: