-
-
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
G28 homing problem #4496
Comments
had to enable this #define PROBE_DOUBLE_TOUCH to get it like i want #define Z_RAISE_PROBE_DEPLOY_STOW 0
#define Z_RAISE_BETWEEN_PROBINGS 0
#define MIN_Z_HEIGHT_FOR_HOMING 5 |
@Slavulj What kind of machine do you have? What kind of bed leveling are you using? Do you always home Z with a probe, or do you have a Z min endstop? And, do you still see the incorrect behavior when using @Roxy-3D @jbrazio @AnHardt Apparently in |
@Slavulj If you enable The reason that there is any raise at all is because #if Z_RAISE_BETWEEN_PROBINGS > Z_RAISE_PROBE_DEPLOY_STOW
#define _Z_RAISE_PROBE_DEPLOY_STOW Z_RAISE_BETWEEN_PROBINGS
#else
#define _Z_RAISE_PROBE_DEPLOY_STOW Z_RAISE_PROBE_DEPLOY_STOW
#endif |
I can confirm it is there. It is in the UBL code that I forked from RC-6 on July 4th. It is annoying as hell! (especially since my FolgerTech-2020 printer has a super slow Z Axis.) But I haven't complained because I know it will get fixed soon enough and I'll just grab the fix and update the UBL branch with it. I apologize, but even though it has been annoying me, I have spent zero time looking for it. I can tell you this... After a reboot, the system does a raise (because it needs to do it) when a G28 is given. The system homes X & Y. but then... It still doesn't know where the Z is located. So it does YET ANOTHER raise before it deploys the Z probe. It doesn't seem to remember it already did a raise before it did the X & Y home. That might be enough information to find it???? |
@Roxy-3D I'm not convinced by your analysis and still need to see the logs. Could you perhaps try |
Yes. But remember... I'm working with the code as it was July 4th. Maybe what I'm seeing is it raising too high??? It is going up to Z=18 and I really don't need that much height. Maybe that is what is annoying me???? Because my Z_RAISE_ numbers: #define Z_RAISE_PROBE_DEPLOY_STOW 5 // Raise to make room for the probe to deploy / stow
#define Z_RAISE_BETWEEN_PROBINGS 5 // Raise between probing points. Also... I have made some minor changes to G28. So if the log can't possibly happen in the RC7 branch, it may be you have to look at G28 in devel_ubl.
|
Is that a log from |
That is from the UBL branch which was forked from RCBugFix on July 4th. I do not have a 'Pure' RCBugFix to show you because right now I'm entirely focused on UBL. But I can tell you I had RCBugFix running in its pure form on July 4th with nothing else in it, and it was doing this 'extra' raise at that point in time with no modifications to the code. I'll cut down the size of the log and post that next. I believe the extra height is showing up immediately after the first Z-Probe is done. But I'll watch and confirm that.... |
I would like to add my side of bug as well I enabled raise z before homing and uses stow feature as well for ABL as attached by the following config file I am using prusa i3 variant with a z max endstop setup. During homing, marlin would raise the z axis twice, first for the z raise before home, second is for stow/deploy command. During the g28 testing, I manually pressed the z max endstop with my hand, after the z raise before home initiated, I released it it worked okay followed with stoe/deploy procedure. Then here comes the next one, I press the z max endstop right before the stow/deploy (after z raise before home), it didn't raise (this isn't the main issues) and it goes down to use the servo mounted probe. After the probe detected there's a contact, it just stops there and stow away the servo probe, leaving the display value of z axis at about +17mm above the bed but physically it's at around 2-3mm above the bed. Tried this three times in a row |
That is interesting! Both @sarf2k4 and I are seeing similar things. His nozzle is going to +17mm and mine is about 18mm. Here is a G28 log with all the extra debugging cut out. In my case, the very first thing it does is go to 18.3mm and after the Z-Probe operation, it ends up at 16.3mm.
|
@sarf2k4
If you want to use the z-max endstop for homing simply set
Right, if using a probe to home to z-min.
Why did you press the z-max-endstop? What should it be good for?
Obviously it can not rise. The z-max endstop is triggered and prevents a rise. That's what it is for.
z goes down to ~ 2.85 where the probe triggers. If you still hold the z-max-endstop z can't rise, but the planner is not informed and thinks the move has been done. 15+~ 2.85 = ~17. So everything works as designed but your finger on the z-max-endstop. Repeating this can't give a different result. Only the first raise will not be tried because the planner now thinks z is high enough to move in x/y-direction. For the answer to the question why these last stow move ends at (Z_RAISE_PROBE_DEPLOY_STOW + ~Z_PROBE_OFFSET_FROM_EXTRUDER) and not at Z_RAISE_PROBE_DEPLOY_STOW ask @thinkyhead |
I'll see if putting 4217 into it helps! The extra high raise is annoying, but it isn't stopping me from doing my work. That is why I haven't been complaining or spending time on it. |
However your end height 16.3 is |
The pins for z max endstop are correct and working fine, i use mechanical manually wired switch. For the z max endstop, i required it so that the z axis will not crash on my z tower bracket for the z raise before homing feature if the z axis were to be near to the tower bracket after it turned off. After i did press the endstop manually to test out if the z endstop works fine and will not ignore during During the second raise which is the stow/deploy raise, i did this for the scenario what if rhe z max endstop were to be triggered during this procedure, and i also released my hand from the endstop after seeing the z axis started to descend to get the z axis position. To me, the most important part is not to let the axis crash to either direction especially on z axis, it can be a pain once it crashed. I will give it another test later after finish printing. |
This is the statement that annoys me. Because the machine only initializes with Z=0, but after that we can track relative movement. So, after some raise, the result might be Z=5. If we tell Z to raise to 5 again, it shouldn't, because (wrong or not) it now has Z=5. If there's some additional raise happening, it sounds like it's because some piece of code is setting Z to zero again. Which is wrong. When we do homing, we should always preserve the Z coordinate, even if it is wrong, and do everything relative to that. But some contributors (see MBL with its |
That is a good clue! I'm all set to debug this. I crossed #4217 over and it fixed the extra raise, but it caused some other strange movement that I don't think is safe. [I'm not being critical of #4217. The problem is it wasn't done and checked out with my changes.] In the case of UBL, at its foundation level, it is a High Resolution Mesh. So most places that had Your hint, along with the DEBUG_LEVELING stuff should let me find it fairly quickly. |
I admit it's more, but that's the strangeness of |
The concept is easy. We have 3 levels:
The names do not reflect their function very well, but that's a discussion i gave up. |
Of course, they could be changed to
Well, the bug we're looking for doesn't just raise by the difference between |
@thinkyhead
|
Yes! I was going to point that out as I saw Blue-Marlin's comment show up: echo:Z-Probe Offset (mm): servo init angle(80)
|
@thinkyhead |
See how easily I get led astray? Personally, I think we should get rid of all the 'RAISE' text in the names. HEIGHT is what we really are doing now. |
That would explain why the raise is higher than anticipated. But I think the rationale for adding In other words, I thought we should add Perhaps it makes better sense to just make Or, it may make sense for z homing (when a probe will be used) to also add |
Here's a perfect example of what I mean. Roxy didn't make |
No. She should not! |
Am I missing something? If you deploy at 7mm height an inductive probe that triggers at 11mm above the bed, then it will be triggered right away. So you need to set your initial height over 11mm. If you have a servo probe that sits 11mm below the nozzle, you can't even deploy it at 7mm height. Thus we do need to enforce a minimum distance of |
Of c(our)se! In case of a normal switch, where the lever is hanging down below its trigger point, is the problem of your thoughts. |
They way I see it... The way I understand things... Z-Probe-Offset isn't part of the behavior. That is so the machine can subtract that amount off of the probed point to know where the bed is. It has nothing to do with what height is needed to move around or deploy the probe.
Nobody told me I needed to do that. And I really don't need that. I have a cheap micro-switch from China with a little roller thingy on it. It can get depressed as it deploys and everything is fine. I don't need the nozzle to be so high it doesn't even touch the bed as it swings into position.
I have a cheap micro-switch from China with a roller wheel on it. I don't have an inductive probe.
I think I agree with this statement. In the morning I'll yank that out of the do_probe_raise() and see if things are better for me. I may need to shift my numbers some because I've been cutting them back because of the 'extra' raise. But if we are going to move to a Z_HEIGHT type of name, I think they should be used by themselves.
I think the users will find it easier to get setup if we are not combining and adding numbers together. I think in this case, we just want to use the MIN_Z_HEIGHT_FOR_HOMING number and not try to get tricky. And I know this next statement is going to cause trouble. But my feelings are MIN_Z_HEIGHT_FOR_HOMING is 1mm for me. I just need the nozzle up off the bed. The Z_HEIGHT_TO_DEPLOY_PROBE should handle the Z homing part. |
I presume we all know this, so didn't bother to mention it. But yes, all the more reason to use it as the bare minimum height. |
A try of rewording:
|
I can live with what ever gets decided. But I need less than the Z_PROBE_OFFSET_FROM_EXTRUDER. The position of the roller on the switch is such that it can get into position just fine at less than that number. |
So does removing these lines from if (zprobe_zoffset < 0)
z_dest -= zprobe_zoffset; |
@Blue-Marlin Your wording is good. @thinkyhead I'm going to do just that in the morning and give it a try. I'll report back on that question in the morning. |
I just need 1mm for this. I just want the nozzle up off the bed. Maybe this should be called MIN_Z_HEIGHT_FOR_HOMING_XY ????? |
When I was printing a lot of ABS this would have made troughs in the dried ABS slurry covering my bed. (I was a messy ABS printing fool.) |
@thinkyhead
is wrong anyway. If at all
but that is not recognizing hanging normal switches. ... Running in circles. |
I think not. When the offset is positive, it's because the nozzle presses against something to trigger the "probe." It's not because there is something physically higher up. The nozzle is still at offset zero. |
Everywhere. Regardless how much slope your bed has. Regardless if you are crossing a clamp. |
Sorry. 5:25am. Going to bed. |
Sleep! It's beer-o-clock here. 🍺 |
And that is why a couple nicely named 'Z_HEIGHT_' things makes everything simple. You have Z_HEIGHT_TO_HOME_XY and Z_HEIGHT_TO_DEPLOY_Z_PROBE and maybe we need one more like Z_HEIGHT_BETWEEN_PROBES. The point is, by changing from RAISE to HEIGHT we are shifting from a relative to absolute coordinate system. We only need to specify a few absolute numbers and we can make the right thing happen. |
@makaira were right, I did hold the z max endstop after the probing, that's why the z axis didn't get raised. Sorry for the false alarm on this one |
Everything is behaving nicely for me with those lines commented out. I think we should consider propagating the changes to RC-7.
|
How does this issue look now with the latest |
In a few days I'll be able to check it out. But right now, I think there is a 50%-50% chance I found a compiler bug in the floating point math. (I had a Phd TA (Teaching Assistant) my first year of engineering that was a Computer Science Major. He cautioned us about ever screaming "Compiler bug!" ) It is going to take me a couple of days to prove (or disprove) it. But right now... I've got enough hard data that I'm very suspicious. It could just be a rounding error. But I'm seeing the flaw at 4 decimal digits of precision. So with 4 byte floats, I'm having a hard time explaining it. If it is just a rounding error, the recursive |
Any news here? |
"Ladies and gentlemen, @Slavulj has left the building." |
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. |
Hello,
i got problem while homing with G28
im homing with inductive sensor and my setup are:
problem is when i home it,
it up z for 5mm, home x, home y, go to the mid(coz of Z_SAFE_HOMING)
and again up z for 5mm, i dont want to go for 5mm more
but when i make Z_RAISE_BETWEEN_PROBINGS to 0
it goes how i want:
up z for 5, home x, home y, go mid, home z
BUT then autolevel does not work because there is no raise between probing
when i make MIN_Z_HEIGHT_FOR_HOMING to 0
it does not rise up z on start which i want
i use Marlin 1.1.0-RC7
The text was updated successfully, but these errors were encountered: