Iterative Bed Leveling: 1st run always off
-
I have bed.g looping a few times until it reaches a good result. Typically the first time through the 3 points, it reports having to adjust all lead screws around 0.025 mm (actually varies between about 0.01 and 0.05, but tends to be close enough together that it seems like they're all off by the same amount, plus or minus a little for imperfect accurancy). Then it goes around again, and gets closer each time around, until it's good enough and stops.
If I run G32 again right away, again the first 3 points are off by about 0.025 mm. That seems wrong. If the end of the last leveling showed all 3 points were where they should be, how did the bed move down a quarter mm [EDIT: not a quarter mm; 0.025mm]? I know it didn't, but that seems to be what it's saying.
I looked at the G30 documentation and it's very confusing. The part where the P param controls whether it's doing multiple points and evaluating the level I get, and I know there's a bug where without the P param it ignores X & Y and just probes in place. But some things I have no clue about: "When the probe is triggered, sets the Z coordinate to the probe trigger height." What does it mean to set the Z coordinate? Moving the nozzle? Storing a number in memory? What is the trigger height? Presumably it's how far between the stowed probe tip and the bed at the time it's triggered. But how could it possibly know that without knowing how high it is from the bed at the time the probe is triggered, which is why it's probing in the first place? These phrases have no meaning unless both end points of the measurement are specified, and the state of the probe and bed at the time are specified, so I can only guess. "adjusts the tool Z offset to make the actual stop height match the configured value". Same kind of problem here: What does it mean to adjust the tool Z offset? Presumably, storing a value in memory, but what value and where? The actual stop height - are we talking about a microswitch, so that this doesn't apply if there isn't one? Otherwise, what does "the actual stop height" mean? "The configured value" is vague. What value, configured where?
So I can't figure out what's going on or how to fix it from the G30 documentation.
-
@DonStauffer said in Iterative Bed Leveling: 1st run always off:
0.025 mm
Firstly that is not a quarter of a millimetre, is that the actual value?
Secondly not moving to the X,Y position when no P parameter is specified is I think a deliberate choice,not a bug. I'm not 100% sure but I suspect ignoring X and Y is there for compatibility with some existing gcode standard. My guess is that this will not be changed lightly (if at all), imagine a CNC machine that has been happily ignoring X and Y coordinates generated by some post processor for years, suddenly moving to a possibly invalid X.Y location after an update...
For many of your other questions you need to remember that using a probe is not all about probing the bed. That is the common case for 3D printing, but when using a CNC mill or other type of machine the probe is often used to locate parts of the item being worked on (both vertical and in some cases horizontal points). So some of those operations are used for that. Similarly if you have multiple tools then a probe may often be used to help you correctly set the various offsets of that individual tool (see G10). For some of the other values see G31. The trigger height is simply the Z coordinate above a target at which the probe will have its "Trigger value" reading (remember not all probes are simply on/off some produce an analogue output). Similarly there are X, Y trigger points which may be used by some probes for horizontal or full 3d probing. As to where these values exist like pretty much everything with RRF they exist only in the controller's memory unless you deliberately store them in a config file.
Going back to your 0.025 offset. Are you using the probe to set Z=0 on your printer? If so are you resetting that Z=0 point after performing G32? You probably should be. Is the point you probe to set Z=0 the same as any of the points that you use to perform the G31 action? If not then what you are seeing may simply be the difference between the Z coordinate of the point you have chosen to probe for your Z=0 value and the plane that passes through the points used in G31.
-
@DonStauffer regarding always having an offset, the probe points are relative to the homed position. If your homing position is in the middle of your bed, and your bed has a slight bow in it, then the probe points will be both be positive (or negative). The bed levelling tries to level the plane between the probe points, and resets the height at the bed origin. So a subsequent homing shifts that plane again, and then the probe points are higher or lower the next time round.
At least, that’s my understanding!
Ian
-
@DonStauffer said in Iterative Bed Leveling: 1st run always off:
If I run G32 again right away, again the first 3 points are off by about 0.025 mm. That seems wrong. If the end of the last leveling showed all 3 points were where they should be, how did the bed move down a quarter mm? I know it didn't, but that seems to be what it's saying.
As Andy pointed out, that's only 1/40th of a millimeter, not 1/4th. lets assume you have a Z axis with 80mm/step at 16x microstepping. In that case, a single step would be 12.5microns, or 0.0125mm. That means the deviation of 0.025mm between those three steppers is a just 2 microsteps or double the thickness of a thick strand of hair.
You may get better repeat results with rehoming after leveling the bed as Andy said, and reducing your probe dive speed (and increasing acceleration, which also increases decelerations IIUC) for more accurate stoppage at sensing the bed.
-
@gloomyandy I thought my edit took care of that. My brain slipped when I called it a quarter mm. It's 0.025 mm.
-
@oliof It's not that it 's a huge amount. I'm trying to understand the process and why, when I iteratively get the level really close, to where successive iterations are refining things much closer than that, running G32 again seems anything but a "continuation" of that process. Another aspect is that where iterative leveling tends to do a sort of "seesaw" of shrinking magnitude, running a new G32 seems to show that initially all 3 screws read near the same non-zero amount, as if they all have been offset by the same amount. It's possible I'm imagining it, but I don't think so. A fair amount of the time, if nothing much has changed, this results in only 2 or 3 iterations to get back where it was - not a lot of mucking around, just adjusting all 3 by that approximate amount, where a "real situation" where there is a reason that the level isn't close does the whole seesaw thing and takes longer. It's as if a leveling run leaves it level, but starting another has the whole thing interpreted as offset a fixed amount.
Not the most important thing in the world, which is why I've let it be that way for a long time, but more recently I've been working on bed.g for another reason and that made me reconsider this.
-
@DonStauffer See the final paragraph in my previous answer. Are you resetting z=0 after you running G32? I suspect that what you are seeing is an offset from your homing point and the plane through your G32 points. Especially if the error is the same for all three points. You could try making your Z=0 setting point be one of the 3 points you probe for G32 and see if that changes things.
-
@gloomyandy I may have brought up too many peripheral issues, some of which are not important.
So distilled, here's my question: My bed.g has a loop, so G32 probes 3 points iteratively, until the error stats are "good enough". I've attached a spreadsheet from the downloaded console log from six consecutive G32 runs. The lead screw adjustment grand totals say it all. I'm skeptical that the lead screw were actually adjusted this much, I've been working on LED display during bed leveling, so I've been running dozens of levelings with nothing in between, no printing, and not even heating. Only sometimes cycling the power and homing. But these 6 were back to back.
The way I read this, it keeps adjusting and adjusting, cumulatively. By now my bed should be against the ceiling (or would it be the floor?)
"Are you using the probe to set Z=0 on your printer?"
I was assuming homing did that. There's no Z microswitch on my machine. I use a BLTouch. Should I be changing the Z param on my G31 line in config.g? I usually set that by homing, then G1 X150 Y150 Z0.5, then moving up or down with G1 until a 0.5 feeler gauge slides under the clean nozzle with minimal drag. I note the difference between the Z coordinate reported on the display vs. 0.5, then change the G31 line Z value by the difference, in the appropriate direction. I repeat that, then do the whole thing again with the bed hot and the nozzle warm. Do I need to do that more carefully? If I do it inaccurately, could that be the cause each of of repeated G32 runs seeming to start at an offset?"If so are you resetting that Z=0 point after performing G32?"
Not sure. I know some people have a final probe in bed.g. Someone once told me to put this after the loop so I did, but I honestly don't know what it does or why the X and Y parameters are there since they don't do anything:
G30 X150 Y150 Z-99999
So I recently added G1 X150 Y150 F5000 before this.What is the purpose of that final probe, and what parameters would it normally have?
"Is the point you probe to set Z=0 the same as any of the points that you use to perform the G31 action?"
No, this is in bed.g, so it's to even up the lead screws for bed leveling. -
@droftarts But these are the adjustment figures after each loop of bed leveling. I put a spreadsheet in another reply that shows the cumulative adjustments growing with each G32. The grand total of adjustments over 6 runs of G32:
-0.046 -0.098 -0.02
There was no G28 or anything else in between those 6 runs. The bed was probably leveled 4 dozen times before that with nothing happening in between - an odd situation because I was working on some LED progress displays.
This isn't that the bed was off that much from the beginning; the first G32 run had adjustments totaling 0.004, -0.008, & -0.002, and the largest single adjustment was 0.037. The major contributor to the totals is often the first time through the loop, but it's the cumulative totals that seem very weird. It seems like the first loop of each G32 run is most of what is driving a constantly increasing adjustment grand total. There are exceptions but looking at the data instead of just my impressions, there are of course outliers, but the net effect seems to be that each G32 run adjusts all 3 lead screws by an average of about 0.015, and it's cumulative. The -0.02 cumulative total on the 3rd lead screw seems to suggest the 3rd lead screw is acting differently. If so, that is an interesting oddity I can't explain.
That seems impossible. And wouldn't the first loop of bed.g make any homing in between irrelevant? See why I'm confused?
-
@oliof Reconsidering dive speed and acceleration sounds like something I should do. Just as a starting place, what values do you find to be reasonably accurate for probing? I have a BLTouch. Even a guess would give me a starting place.
-
@DonStauffer You could always do an M48 run (M48 is not natively part of RRF but several macros float around on the forum) with different values until you find what works best for you. With a BLTouch I personally wouldn't go faster than 10mm/sec dive speed; possibly as low as 6mm/sec.
-
@DonStauffer I think you should post your config.g bed.g and homez.g files
You might also want to try running some tests to see how repeatable the results are from your z probe. That test can also be used to help you decide what acceleration and dive speed.
The purpose of that final probe is to reset your Z=0 (though I'm not sure what that G30 X150 Y150 Z-99999 will actually be doing, I suspect it may just be storing the value in p0, but I may be wrong). The normal way to do this would either be to run G28 Z or to position the probe and run just a plain G30. You need to do this because the adjustments made to level the bed will mean that Z=0 is no longer valid.