Marlin: Usage Question: How to use LCD only for manual UBL mesh creation?

Created on 5 Jun 2017  ·  74Comments  ·  Source: MarlinFirmware/Marlin

I think this question is directed at @Tannoo since the UBL menu is his creation. So I got UBL up and running as as I suspected if I auto-create the mesh I have to go back and tweak about 80 points of the 100. For me it is not worth the time and effort to figure out how to move the head to the correct spot and then edit the information for each of those points. So I am trying to figure out how to use the "business card" method to create the entire mesh from scratch. To say the UBL menu system is a bit less than intuitive is being kind. No disrespect to all the work you did, I wouldn't have gotten as far as I have without the UBL menu system. Is there a way to outline from start to finish what buttons must be pressed in what order to go from no UBL mesh to a complete and enabled UBL mesh, using just the LCD and manually measuring each point?

Sorry for being insistent on the user experience, but no matter how much better UBL is than MESH, one thing that can be said about Ed Patel's implementation is that it was easy to do, with very few steps. So at least, at this stage since better isn't really easy, it becomes a barrier to implement.

Documentation U.B.L. Question

Most helpful comment

After reading all of this, what I'm seeing is that there's a desire to have a MBL-like experience but with UBL? Is that right?

If so, why can't we just change things so G29 P2 on an uninitialized mesh initializes it to 0 and then proceeds with a complete mesh generation using a business card or feeler gauge or whatever people like to use, just like MBL (which I used to use)? This wouldn't be terribly complicated, and we could make everyone who doesn't want to be bothered with learning how to use UBL as it was intended to be used, feel better. This would basically be just like MBL, more or less, and their step-by-step instructions would be: 'G29 P2, manually set every mesh z point just like with MBL, G29 S1, M420 S1, M500, done!' .. right? Or am I missing something? If people don't want to use UBL's extras (which are really helpful), so be it.

(FYI, I'd love to have a 'one-click-to-perfect-mesh' leveling system too, but I don't see where that's coming from until we all have laser triangulation sensors on our printers.)

All 74 comments

Okay, I'm not the UBL expert. This is what I was given and went with that.

Just do the commands
G28
G29 P1 T
G29 P3 R C .5
G26 P C O3.5
G29 P4 R T To edit....

That sequence will get you very close to a perfect mesh.
You just repeat the last two commands and you will have everything perfect.

1) G29 P1 T -- Generate the mesh. (G29 will home if machine is not homed already)
Prepare - Unified Bed Leveling - Tools - Build Mesh -

Build PLA Mesh
or
Build ABS Mesh
or
Build Custom Mesh
or
Build Cold Mesh

2) G29 P3 R C .5 -- Fill-in the spots the probe couldn't reach.
Prepare - Unified Bed Leveling - Tools - Build Mesh - Fill-in Mesh -

Fill-in Mesh
or
Smart Fill-in
or
Manual Fill-in

Note: Smart Fill-in is recommended.

3) G26 P C O3.5 -- Validate Mesh
Prepare - Unified Bed Leveling - Tools - Validate Mesh -

Validate PLA Mesh
or
Validate ABS Mesh
or
Validate Custom Mesh <-- It will be "preset" to the temps used in Build Custom Mesh.

4) G29 P4 R T To edit....
Prepare - Unified Bed Leveling - Tools - Edit Mesh - Fine Tune All

Repeat steps 3 and 4 until you have a perfect mesh.

5) Save Mesh -- Can be done anytime to save progress. But definitely do here.
Prepare - Unified Bed Leveling - Mesh Storage - Save Bed Mesh

"Short and Sweet" version:
1) Prepare - Unified Bed Leveling - Tools - Build Mesh - Build Cold Mesh
2) Prepare - Unified Bed Leveling - Tools - Build Mesh - Fill-in Mesh - Smart Fill-in
3) Prepare - Unified Bed Leveling - Tools - Validate Mesh - Validate PLA Mesh or Validate ABS Mesh
4) Prepare - Unified Bed Leveling - Tools - Edit Mesh - Fine Tune All
5) Repeat 3 and 4 until perfect.
6) Prepare - Unified Bed Leveling - Mesh Storage - Save Bed Mesh

I was thinking of a Step-by-Step mesh generation menu (based on the above) placed here:
Prepare - Unified Bed Leveling - Step-by-Step -
1 - Generate Mesh
2 - Fill-in Mesh
3 - Validate Mesh
4 - Edit Mesh
5 - Save Bed Mesh

Thoughts?

If I read the instructions above correctly, UBL needs an auto-generated mesh before you can do a Fill-In Mesh. And, I am not sure why I would validate the mesh if I am just going to fine tune the whole mesh.

The results of the above sequence are: When you gedt to the step of selecting Fine Tune All the printer just pauses for a minute then drops you back at the Info screen with the status message Doing G29 UBL! but nothing actually happens. There is no hotend movement, no temps increasing, no up and down movement. Turning the encoder does nothing. Pressing the encoder exits the Doing G29 UBL! but nothing changed.

It appears that within UBL currently there is no equivalent functionality to the old MESH bed leveling or if the functionality is there it is broken. This is what should be considered a show stopping bug.

Open a serial monitor and then Prepare - Unified Bed Leveling - Output Mesh Map - Output for Host

Post here the output of that.

Validating the mesh, prints a pattern to see what needs to be adjusted.
Without that, you are just editing what you think needs editing.

I am working on a way to see the mesh point values on the lcd and then edit that point (and a few points around it).

If I read the instructions above correctly, UBL needs an auto-generated mesh before you can do a Fill-In Mesh. And, I am not sure why I would validate the mesh if I am just going to fine tune the whole mesh.

Well, you asked:

Is there a way to outline from start to finish what buttons must be pressed in what order to go from no UBL mesh to a complete and enabled UBL mesh, using just the LCD and manually measuring each point?

So, I did that.

@WheresWaldo

Tannoo and I are exploring ideas to make the user interface very intuitive from the LCD. We don't have all the answers. But just as a side effect of exploring the ideas discussed in https://github.com/Tannoo/Marlin/issues/4#issuecomment-306090327 this fell out:
https://github.com/MarlinFirmware/Marlin/pull/6964 to solve some of the user intuitive issues from the LCD Panel interface. And now Thinky is wondering if he can get another 1KB out of RAM here: https://github.com/MarlinFirmware/Marlin/pull/6965#issue-233732803 I might be side tracked for a few weeks.

A while ago you wanted Z-Movement of the probe while editing mesh points. I put it back in the code with this comment:

 #define UBL_MESH_EDIT_MOVES_Z     // Sophisticated users prefer no movement of nozzle

Tannoo and I are mostly focused on getting the foundation pieces in place. In 6 weeks, everything will be polished.

Here is something that would be helpful and can be implemented in a couple of days: Find three or four command strings of various G29 commands that build a perfect mesh and works for your users. We can give you a 'Quick Start' menu sequence that does everything you need. One set of enqueued commands after another....

If you can put 3 or 4 sequences of commands together to build a perfect mesh, we can make it so the user just clicks through them.

But right now.... until we get Tannoo's stuff working on 20x4 displays... We aren't ready to polish things.

As I mentioned I am not intentionally trying to be dense, it is just hard to justify a wholesale change that removes an easy to use function. I am trying Tannoo's method again, and it simply doesn't work, When you get to the Fill In All it stops and does nothing. The instructions don't work so really was my question answered?

If this is something that will be looked at in the near future, then I will tell all my users to stick with 1.1.1 and MESH until it is done. I know you are working on this and I know that it is near and dear to you. I also know that you are working to get all the basic functions working in a predictable manner. Just please do not forget that 3D printing is no longer solely used by enthusiasts who actually know what a g-code is.

Also note that if this was only a request for myself, I wouldn't care as much about simplicity, I am fully capable of creating a mesh, validating a mesh and editing a mesh from the serial terminal. What I cannot state with any degree of certainty is whether or not any of the potential users are capable of the same. I can say with certainty that most are not!

Just please do not forget that 3D printing is no longer solely used by enthusiasts who actually know what a g-code is.

That is exactly why I created the UBL menu system.

There have been some code changes and the UBL menu doesn't always get updated with it. I will have to look at it again and see if everything is still kosher.
Working on other things keeps me from maintaining merged code all the time.

@WheresWaldo Please read (and spend a few minutes improving) Bob's UBL guide here: https://github.com/MarlinFirmware/MarlinDocumentation/blob/master/_features/unified_bed_leveling.md

But very early... In the first page of that document is a quick start guide of commands that are all available from Tannoo's menu system.... How about you try going through those steps using the LCD Interface and let us know if some step is failing.

And we will even put what you want on a 'Quick Start' LCD Menu Page. But... right now we are trying to get the foundation in place.

I am very sympathetic about making things intuitive. I do try to do that. But I do foundational pieces: https://github.com/MarlinFirmware/Marlin/issues/3900#issuecomment-222672507

When you get to the Fill In All it stops and does nothing.

It does do something. It fills in the remaining 0.000's with something other than 0's. It doesn't need to move anything to do that.

I am now creating a new 10x10 mesh using the new Step-by-Step. I will see if there is something broken or not.

@Tannoo There appears to be a miscommunication between what I am asking about and what you are hearing I am asking about. I don't want to edit the mesh, I want to MANUALLY create the mesh. Whether the mesh has values (as shown in Prepare - Unified Bed Leveling - Output Mesh Map - Output for Host) or are all zeros, when you use the steps you outlined at Fine Tune All it stops working.

I will see what I can do about looking over the wiki page and ideas about a Quick Start Menu later on in the week,

Also I mistyped in a previous response when I wrote Fill In all, there is no fill in since the nozzle is the probe it physically cannot print anywhere it can't probe, so no fill in is required. It should have read Fine Tune All

Okay, I have never created a full mesh that way. With a probe, but not auto-generating any of it?

@Tannoo Thank you for being so patient with me. That is what I meant by duplicating the MESH method using UBL.

I know the functionality is there, it is just so complex that it feels like UBL is the repeal and replace of MESH without keeping any of the existing benefits.

Why do UBL then? Why not MESH_BED_LEVELING?

I will see about creating it like you said and see where the issue might be.

Because in my playing with the LCD map for UBL, I am able to edit points even with everything being 0's.
Roxy has had issues with editing anything that way, I don't know why because mine works fine.

Why use UBL over MESH, because everyone is telling me that MESH is deprecated!

This is what I got when trying to edit the points with the entire mesh being all 0's:

echo:enqueueing "G29 P4 R T"
echo:Home XYZ first
echo:busy: processing
X:0.00 Y:0.00 Z:6.05 E:0.00 Count X:0 Y:0 Z:23232
?(R)epetition count invalid (1+).

You get the same error if the mesh actually has numbers in it.

People... I'm not sure if there are compile and link problems if you do this... But there is no reason you can't do a G29 P0 and follow it with a G26. You will know (without even probing a single location) where you need to edit the mesh...

You should be able (with one extra iteration) to bring up UBL with a perfect mesh even if you probe nothing.

Don't even bother manual probing the bed. Just do a G26 and _SEE_ where you need to edit things.

Okay, I remember somewhere that the R needs to be R999 to do all points. I will change that.
That works for me.

@Roxy-3D I understand what you are saying, but question whether that is actually easier, feel can be much more accurate than sight especially for people like me as old as dirt. I don't think we are going to solve this tonight, maybe once you are further along with code optimization and core functionality we can revisit this and figure out a way to make this work

So, a manual input of G29 P4 R999 T will work.

Can also change the edit menu item in ultralcd.cpp:
from
MENU_ITEM(gcode, MSG_UBL_FINE_TUNE_ALL, PSTR("G29 P4 R T"));
to
MENU_ITEM(gcode, MSG_UBL_FINE_TUNE_ALL, PSTR("G29 P4 R999 T"));

I did this and it is now starting to edit points with no issues.

Just curious @Tannoo did you ever use MESH yourself, or have you mostly used auto-leveling then moved on to UBL? If you have used MESH then you should recall how the mesh was created.
I can't test this fix at the moment since my printer is loud and everyone here but me is sleeping.

I understand what you are saying, but question whether that is actually easier, feel can be much more accurate that sight especially for people like me as old as dirt..

Yeah... I get it... I got distracted today because I saw a way to save 100 bytes of RAM. But I did say: https://github.com/Tannoo/Marlin/issues/4#issuecomment-306111408

Probably figuring out how to get the nozzle to track the edit location nicely is more important right now.

We are trying hard to get the big pieces in place...

As I suggested, we can hash this out when the core work is done. I just wanted to make sure that the both of you understood the request and the necessity for it.

I used MESH back when auto bed leveling didn't work for me.
I would try the auto bed leveling every so often to see if it got fixed and one day it did. So, I started using that. It was WAAAY easier and automated.

Then UBL came about. Soooo many options. I couldn't remember what to use to make the mesh work. So, I made a menu system to get my "cheat sheet" in the menu.

Agree, Automated is the way it should be used. however I am stuck with a poor implementation of the endstop probe, that is inconsistent across the bed, It is close, but not close enough, so auto-leveling of any kind ends up with less than stellar results. MESH was the answer, since you knew by feel if you nozzle was touching the bed. I know this functionality is stuck in UBL somewhere, I just asked if it can be bubbled up to the top.

I still have a few small issues with UBL that are hard to explain, and one day it will be sorted out, or I will understand what is happening.

I am stuck with a poor implementation of the endstop probe, that is inconsistent across the bed, It is close, but not close enough

That needs to be addressed. No need to be "stuck with it".

I used MESH back when auto bed leveling didn't work for me.
I would try the auto bed leveling every so often to see if it got fixed and one day it did. So, I started using that. It was WAAAY easier and automated.

And my history is I added some much needed options to the early Auto Bed Leveling: http://3dprintboard.com/showthread.php?3105-Auto_Bed_Leveling-Enhanced-G29-command That thread is 3 years old. And with one exception... all of the extra options there made it into the main branch of Marlin.

Now... I'm trying to get the best features of all of the various bed leveling systems into the same system and working together and I'm getting top notch help on everything from the LCD display to making the system work on Delta's.

I am stuck with a poor implementation of the endstop probe, that is inconsistent across the bed, It is close, but not close enough

That needs to be addressed. No need to be "stuck with it".

Even without fixing that bed slop.... You can do a G29 P0 and do a G26 and start editing your mesh.

Please see if that will work for your users.

@Roxy-3D I have asked in the past about editing mesh points, and as a courtesy I will ask again, I will also try it with no mesh enabled to see if it is workable, I wonder if simply doing a G29 P0 followed by a G29 P4 R999 T would do exactly what I am expecting. That would save the time of printing the validation grid.

@Tannoo believe me I am not STUCK with any part of my printers. But when you are dealing with users, some of whom had no business buying a 3D Printer in the first place, you can't expect them to "upgrade" anything. And what is ironic, is that I have a completely workable IR probe sitting in an electrostatic bag in my desk drawer, ready to be installed in this printer. I am not the issue here.

You need to go up to a higher level... You want to end up with a perfect mesh that describes your print surface. How you get there doesn't matter.

If you have a good machine... One that with no auto bed leveling correction can print a calibration cube in the center....

Then... Doing a G29 P0 followed with a G26 mesh validation pattern will let you in 2 or 3 iterations have a perfect mesh.

If you have a horrible machine with a tilted bed with lots of high and low spots... You might be better off leveling the bed as much as you can and then doing a G29 P1 followed by a G26 G29 P4 editing cycle.

But when you are dealing with users, some of whom had no business buying a 3D Printer in the first place, you can't expect them to "upgrade" anything.

Well, hopefully they are willing to try the steps in the Bob's "Quick Start Guide" :

The following command sequence can be used to home, level, and then fine-tune the results:

M502 ; Reset settings to configuration defaults...
M500 ; ...and Save to EEPROM. Use this on a new install.

M190 S65 ; Not required, but having the printer at temperature helps accuracy
M104 S210 ; Not required, but having the printer at temperature helps accuracy

G28 ; Home XYZ.
G29 P1 ; Do automated probing of the bed.
G29 P2 B T ; Do manual probing of unprobed points. Requires LCD.
G29 P3 T ; Repeat until all mesh points are filled in.

G29 T ; View the Z compensation values.
M420 S1 ; Activate leveling compensation.
G29 S1 ; Save UBL mesh points to EEPROM.
M500 ; Save current setup. WARNING: UBL will be active at power up, before any G28.

G26 C P T3.0 ; Produce mesh validation pattern with primed nozzle
G29 P4 T ; Move nozzle to 'bad' areas and fine tune the values if needed
; Repeat G26 and G29 P4 O commands as needed.

G29 S1 ; Save UBL mesh values to EEPROM.

That can now all be done from the LCD Panel. But doing that from a host interface _DOES_ work. I bet if you try it from PronterFace you are going to say "Oh... This kind of makes sense...."

@Roxy-3D I have done it that way, not an issue, but I am smarter than the average bear, or at least I like to think so!

I will try out all these methods tomorrow (actually later today after some sleep). Making note of which ones are actually intuitive for someone like BooBoo to use, easy and intuitive are not equivalent expressions. If there is a way to make as simple as MESH actually was, the beauty was in its simplicity and the fact that it actually worked, with a minimum of steps it will be a big win for everyone.

But when you are dealing with users, some of whom had no business buying a 3D Printer in the first place, you can't expect them to "upgrade" anything.

Believe me, I feel your pain. I have that in my profession also.

Okay, Fine Tune All is not the answer! Fine tuning still requires you to GUESS what is the correct adjustment. Yes @Roxy-3D I know I can print a validation grid and "look" at it, but there is simply no feedback on Fine Tune to assure the user that it is correct. The functionality was there, now it is not. Another note to remember post code optimization. No noob want to input a bunch of numbers, they want to turn a knob and have it move. Yes UBL_MESH_EDIT_MOVES_Z is enabled.

Look at it from a complete idiots perspective. I had Auto-Level that never really worked good, some spots would be too close some spots too far, then MESH shows up and while it required more steps than including G29 in my slicer start up script, I only needed to do it once and the machine helped me do it by providing tactile feedback if equipped with an LCD controller. Now UBL is replacing MESH and you tell me I can do exactly the same thing, but it I need to use 7 more steps and I will get no tactile feedback from the printer and every number has to be figured out and entered by me. Why would idiot me want that, I barely understood what I needed to do with MESH and the machine helped, Now I have to do more and I don't get any help from the printer to boot.

That is exactly how this has to be viewed. You can talk until your blue in the face about how great and easy it is, but you are not seeing that it really isn't easy. It is more comprehensive and maybe even better, but you need to strike EASY from your vocabulary.

Sorry I am not in a great mood today as I was just informed that a closer friend has only a short time left as a result of cancer. Regardless the essence of this post stands.

tldr: I had tactile feedback before, now I don't, I could do everything in a few steps, now I can't.

There is one very easy way to solve this, reverse the decision to deprecate MESH. Relabel it manual leveling if it makes everyone feel better. or the hard way, duplicate the functionality in UBL.

As an outsider with a “probeless” printer with LCD controller, please let me echo Waldo’s thoughts. I’m upgrading my son’s printer firmware and he needs to use it untethered from a PC. Once the firmware is flashed, he needs to operate and calibrate it as a stand-alone machine. He has no GCode experience.

Currently we’re using the manual MESH process, which I understand is going away, but a Manual UBL method would still be an option. MESH was quick, easy to understand, and it worked very well: Simply build a height map by using a paper feeler gauge, turn the knob for resistance, push the knob to go to the next point in the grid, repeat until done. Save. Takes about 5 minutes to do a 7x7 grid. No tethering, no entering numbers.

I can understand automating the bed leveling process for more sophisticated machines and users, but please also include a MESH-like basic, simple, manual, mechanical-feedback, untethered process. I’m happy to test and report back.

I can understand automating the bed leveling process for more sophisticated machines and users, but please also include a MESH-like basic, simple, manual, mechanical-feedback, untethered process. I’m happy to test and report back.

Yes... The need is understood. But seriously... It is worth trying something and seeing if it works for you.

  • First, get your Z-Endstop set so you can print a small object in the center of your bed with no bed leveling active. This is mandatory.
  • Set the entire mesh to 0.0000's with G29 P0.
  • Then do a G26 Mesh Validation Pattern and see what it looks like. If you even get half of the pattern to print, you can move the nozzle to various problem areas and start editing the mesh.
  • You _WILL_ see an improvement after each iteration, and pretty soon you will be able to use the entire print bed with no adhesion issues.
  • Once the mesh is finely tuned... You won't need to mess with it any more. It will just be 'right'.

This is very easy to try. And it _will_ work if you can print something small at the center of the bed without any leveling system active. Just because there are a lot of options and ways to combine features, you don't need to do any of that. Just try the _simple and easy_ steps listed up above and you _will_ get good results.

Roxy - Thank you for your reply.

I'm willing to try, but issuing GCode means being tethered to a PC. The premise of MESH was that a printer with an LCD controller could be calibrated as a stand-alone machine with no knowledge of GCode.

Or am I missing something?

I'm willing to try, but issuing GCode means being tethered to a PC.

No... This is not true. The LCD Panel code (if you have a Graphics controller) will do all the commands you need in that list. We are working to get the 20x4 LCD Panel's going. Those steps up above may be working on 20x4 right now. I don't know.

The premise of MESH was that a printer with an LCD controller could be calibrated as a stand-alone machine with no knowledge of GCode.

No. That was never the premise of Mesh Bed Leveling. Mesh Bed Leveling happened because epatel could not get acceptable results using the grid based leveling that tilted an assumed perfectly flat plane.

As it turns out... very few pieces of glass are 'flat'. They look flat, but they are not flat. That is the premise for Mesh Bed Leveling. But with that said... The steps up above should work from a Graphical LCD Panel and if they don't work for a 20x4 LCD Panel, they will soon enough.

@Roxy-3D I don't think the issue is that no one wants to try it your way, it is just that your way adds more steps that involve human interpretation of the results, each time you add that step you introduce another point where errors can creep into the process.

Very simple, (I actually did this already today)

UBL

  1. I set up an auto generated mesh,
  2. then print a mesh validation and visually interpret the results
  3. then figure out where the mesh needs adjusting and adjust them
  4. then reprint the validation mesh
  5. then figure out where it still needs adjusting or I adjusted it incorrectly and adjust them, now I am closer
  6. then print a third mesh validation print and adjust it now I am satisfied.

MESH

  1. I ask MESH to create a mesh and measure all the points
    Done

So a process that used to take 15 minutes now takes at the least an hour maybe more It actually took me about 1:40 minutes after all the prints and looking at the results and figuring out what needed changes and where. Regardless the intent of MESH it certainly was easier to use. But I also mentioned, that likely all the pieces are there already in your code, I trust that you have done all the work. Now it is time to think about presentation and how to implement all that work. Just so you don't think I oversimplified MESH, please note that there was tactile feedback so when the nozzle touched the feeler gauge you could actually feel that the gauge was touched, In it's current form there is no tactile feedback so I have to print the mesh and remove it without damage from the bed so I can use my calipers to measure all the intersecting points or make visual assumptions if I cannot remove the mesh without damage.

Unless your bed is milled tool plate then flat is not a word that can be used in any 3D printer that uses a build plate of another material. Then we add heat while constraining the bed at the mounting points.

I really don't understand all the concern. You can generate a mesh automatically with G29 P1 and G29 P3. You can generate a mesh with manual probing if you want with G29 P2. You can claim your bed is flat with G29 P0 and rely on the mesh validation pattern and interactive editing (G29 P4) to get it perfect.

It really doesn't matter how you decide to get a finely tuned mesh. The tools are in place to do that even if your machine doesn't have a Z-Probe. And the mesh can be saved so unless your printer gets damaged or worn, you can keep using the mesh you tuned.

Personally... I hate doing manual probes. But the G29 P2 code works nicely and can be used by people that don't have a Z-Probe and are willing to do that.

It looks like the only way people will be happy is if we have a LCD Panel option that says "Setup UBL perfectly with one click." But even then, the people without LCD Panel's would be complaining there is no way for them to do one click.

After reading all of this, what I'm seeing is that there's a desire to have a MBL-like experience but with UBL? Is that right?

If so, why can't we just change things so G29 P2 on an uninitialized mesh initializes it to 0 and then proceeds with a complete mesh generation using a business card or feeler gauge or whatever people like to use, just like MBL (which I used to use)? This wouldn't be terribly complicated, and we could make everyone who doesn't want to be bothered with learning how to use UBL as it was intended to be used, feel better. This would basically be just like MBL, more or less, and their step-by-step instructions would be: 'G29 P2, manually set every mesh z point just like with MBL, G29 S1, M420 S1, M500, done!' .. right? Or am I missing something? If people don't want to use UBL's extras (which are really helpful), so be it.

(FYI, I'd love to have a 'one-click-to-perfect-mesh' leveling system too, but I don't see where that's coming from until we all have laser triangulation sensors on our printers.)

@Roxy-3D You feel like you are getting beat up, don't you?

Not intentional, but you are solely looking at this as a coding problem and not a usability problem. We are not asking to remove any existing functionality, auto generate to your hearts content, but please don't equate ultimate end result (a properly adjusted mesh) with the process used to achieve it. You (royally) in deprecating MESH took away an easy to use, easy to implement process that provided real time feedback with a multi-part setup that does not do any of those things. Yes the final end result is the same but it certainly isn't equivalent. I am going to say something I will likely regret, but this is the essence of the issue:

I really don't understand all the concern.

No one asked for a One-click solution. Just not to remove functionality in an effort to make it 'better'.

@bgort too bad I can't thumbs up your post more than once.

Pretty sure this is just a few lines worth of changes. Let me look.

Yeah, looks like all we need to do is set the whole bed as 'unreachable' and then G29 P2 will allow you to manually set every point.

@WheresWaldo:

Try this and tell me if this gives you what you want, effectively:
G29 I 999
G29 P2 B

@bgort 99% there, it duplicated the functionality perfectly, I knew it was there all along. The only thing missing is visual feedback, but that can wait until all the important things are done. Process leaves you at the info screen the entire time.

I would also see the possibility of a single menu item under UBL tools that would do the following

G28
G29 I 999
G29 P2 B
G29 S1
M420 S1
M500

then even the menu functionality would be restored.

So then really all we need to do is add a menu item named 'MANUALLY GENERATE MESH' or something, which does G29 I <mesh points> and then G29 P2 B, and have some feedback on the screen during the G29 P2 process. I believe what you're looking for was there at one point, but maybe was removed.

Yep, that would do it. It results in a simple to use alternative that stores mesh information in the format UBL needs.

I'm not all that familiar with the menu system - and I think it's being worked on pretty regularly by others anyway - so I'm not the best person to do that, but I can look into the on-screen feedback, unless anyone else wants to do it.

Besides the nozzle moving so you can see where it is relative to the bed.... What else should be seen? Probably the current (X,Y,Z) location of the nozzle. Anything else? Right now G29 P2 just displays the normal Status Screen.

It can display anything that is useful.

Are the current encoder wheel multipliers and 'Steps per Menu Item' sufficient to get the Encoder Wheel to feel good while doing a G29 P2 ? I don't know what should be changed to make the P2 feel better.

Where in the menu would ya'll like MANUALLY GENERATE MESH placed?

This will send G29 I999\nG29 P2 B, correct?

How about we put it at the very top for a few weeks just so people know it is there. Later we can put it in a more reasonable place.

I tagged a T0 at the end for those who do want the serial output during the build.

Okay... #6972

Sorry was busy with life today, What MESH gave you was the number of the point being probed stating at 1 and ending with Rows X Columns and the Z adjustment that way when you turned the encoder not only did the nozzle move up or down, the numbers indicated just where you were. It was a great visual cue. Then pressing the encoder button saved the point and moved the head, incremented the point number and started the process again, when it was all done and the last point was accepted it would store memory to save the mesh. Nothing fancy, but if you wanted to give the array position and Z height that would be completely understandable and easy to communicate. So the menu option actually did more than just measure, pressing LEVEL would home x,y,z then wait for input (encoder click, which was totally unnecessary) then move to first point to start the process, at the last point it would home again and save memory and tell you it was done, then exit to the info screen after an encoder press.

Tannoo just added a command to invalidate the entire mesh and then manually probe it. (And I just merged it.) We put it at the very top of the UBL LCD menu so everybody that has been using the original Mesh Bed Leveling will know it is there.

But... UBL is setup to look for the closest point to the nozzle and do things with that. Everything is designed with the ability to edit (or probe) a region that continually expands until the user says "Good enough!" and stops it. The order the points are probed should not matter so long as they all get probed....

@Roxy-3D Understood, and noticed this behavior when auto-generating the mesh. Numbering sequentially like Edward did, I believe was a concession to ease of programming and display. If it is just the array location and Z then that would be enough to tell what was going on. As you said it doesn't matter what order they are probed as long as the whole bed is probed.

Originally I thought the UBL: Tools Menu would be a good place for this, but once you flush out the entire menu system some likely spot will jump out at you. There were a lot of people in my sphere that were lost and just reapeating over and over "MESH is going away" this completely allays those fears.

Heck it could be just an indicator of Z for the most part.

There were a lot of people in my sphere that were lost and just reapeating over and over "MESH is going away" this completely allays those fears.

Well... The original Mesh Bed Leveling will go away someday. But I suspect it is still with us for another 6 months. There is nothing saying it needs to go away soon. And actually... It is so small in size it might actually make sense to keep it around especially for small 128 KB processors.

The thing is this... The very important lessons and technology that the original Mesh Bed Leveling brought us have been fully understood and absorbed into the later systems. So from that stand point, the natural thing to do is 'move on'. But there is no requirement that happens soon. Mostly, the biggest motivation to do that is to reduce some of the complexity in the code base with all the conditional compilation. And like I say... that doesn't have to happen 'soon'.

That was one reason I had the utmost confidence that the ask here was something already in the code base for UBL and just not explored or exposed for consumer use. If this works and every indication is that it will work exactly or close enough to MESH, MESH code could be completely deprecated without anyone missing it. I also want to apologize if you felt slighted in any way by my insistence, that was not my intention. I was a program manager for, at the time, the number 3 producer of PC software products in the world, and some of that was bubbling back up to the surface.

Does this tell you why it easily got lost in the mix?

G29 Unified Bed Leveling heading

  /**
   *   G29: Unified Bed Leveling by Roxy
   *
   *   Parameters understood by this leveling system:
   *
   *   A     Activate   Activate the Unified Bed Leveling system.
   *
   *   B #   Business   Use the 'Business Card' mode of the Manual Probe subsystem. This is invoked as
   *                    G29 P2 B. The mode of G29 P2 allows you to use a business card or recipe card
   *                    as a shim that the nozzle will pinch as it is lowered. The idea is that you
   *                    can easily feel the nozzle getting to the same height by the amount of resistance
   *                    the business card exhibits to movement. You should try to achieve the same amount
   *                    of resistance on each probed point to facilitate accurate and repeatable measurements.
   *                    You should be very careful not to drive the nozzle into the business card with a
   *                    lot of force as it is very possible to cause damage to your printer if your are
   *                    careless. If you use the B option with G29 P2 B you can omit the numeric value
   *                    on first use to measure the business card's thickness. Subsequent usage of 'B'
   *                    will apply the previously-measured thickness as the default.
   *                    Note: A non-compressible Spark Gap feeler gauge is recommended over a Business Card.
   *
   *   C     Continue   Continue, Constant, Current Location. This is not a primary command. C is used to
   *                    further refine the behaviour of several other commands. Issuing a G29 P1 C will
   *                    continue the generation of a partially constructed Mesh without invalidating what has
   *                    been done. Issuing a G29 P2 C will tell the Manual Probe subsystem to use the current
   *                    location in its search for the closest unmeasured Mesh Point. When used with a G29 Z C
   *                    it indicates to use the current location instead of defaulting to the center of the print bed.
   *
   *   D     Disable    Disable the Unified Bed Leveling system.
   *
   *   E     Stow_probe Stow the probe after each sampled point.
   *
   *   F #   Fade       Fade the amount of Mesh Based Compensation over a specified height. At the
   *                    specified height, no correction is applied and natural printer kenimatics take over. If no
   *                    number is specified for the command, 10mm is assumed to be reasonable.
   *
   *   H #   Height     Specify the Height to raise the nozzle after each manual probe of the bed. The
   *                    default is 5mm.
   *
   *   I #   Invalidate Invalidate specified number of Mesh Points. The nozzle location is used unless
   *                    the X and Y parameter are used. If no number is specified, only the closest Mesh
   *                    point to the location is invalidated. The 'T' parameter is also available to produce
   *                    a map after the operation. This command is useful to invalidate a portion of the
   *                    Mesh so it can be adjusted using other tools in the Unified Bed Leveling System. When
   *                    attempting to invalidate an isolated bad point in the mesh, the 'T' option will indicate
   *                    where the nozzle is positioned in the Mesh with (#). You can move the nozzle around on
   *                    the bed and use this feature to select the center of the area (or cell) you want to
   *                    invalidate.
   *
   *   J #   Grid       Perform a Grid Based Leveling of the current Mesh using a grid with n points on a side.
   *                    Not specifying a grid size will invoke the 3-Point leveling function.
   *
   *   K #   Kompare    Kompare current Mesh with stored Mesh # replacing current Mesh with the result. This
   *                    command literally performs a diff between two Meshes.
   *
   *   L     Load       Load Mesh from the previously activated location in the EEPROM.
   *
   *   L #   Load       Load Mesh from the specified location in the EEPROM. Set this location as activated
   *                    for subsequent Load and Store operations.
   *
   *   The P or Phase commands are used for the bulk of the work to setup a Mesh. In general, your Mesh will
   *   start off being initialized with a G29 P0 or a G29 P1. Further refinement of the Mesh happens with
   *   each additional Phase that processes it.
   *
   *   P0    Phase 0    Zero Mesh Data and turn off the Mesh Compensation System. This reverts the
   *                    3D Printer to the same state it was in before the Unified Bed Leveling Compensation
   *                    was turned on. Setting the entire Mesh to Zero is a special case that allows
   *                    a subsequent G or T leveling operation for backward compatibility.
   *
   *   P1    Phase 1    Invalidate entire Mesh and continue with automatic generation of the Mesh data using
   *                    the Z-Probe. Usually the probe can't reach all areas that the nozzle can reach. On
   *                    Cartesian printers, points within the X_PROBE_OFFSET_FROM_EXTRUDER and Y_PROBE_OFFSET_FROM_EXTRUDER
   *                    area cannot be automatically probed. For Delta printers the area in which DELTA_PROBEABLE_RADIUS
   *                    and DELTA_PRINTABLE_RADIUS do not overlap will not be automatically probed.
   *
   *                    These points will be handled in Phase 2 and Phase 3. If the Phase 1 command is given the
   *                    C (Continue) parameter it does not invalidate the Mesh prior to automatically
   *                    probing needed locations. This allows you to invalidate portions of the Mesh but still
   *                    use the automatic probing capabilities of the Unified Bed Leveling System. An X and Y
   *                    parameter can be given to prioritize where the command should be trying to measure points.
   *                    If the X and Y parameters are not specified the current probe position is used.
   *                    P1 accepts a 'T' (Topology) parameter so you can observe mesh generation.
   *                    P1 also watches for the LCD Panel Encoder Switch to be held down, and will suspend
   *                    generation of the Mesh in that case. (Note: This check is only done between probe points,
   *                    so you must press and hold the switch until the Phase 1 command detects it.)
   *
   *   P2    Phase 2    Probe areas of the Mesh that can't be automatically handled. Phase 2 respects an H
   *                    parameter to control the height between Mesh points. The default height for movement
   *                    between Mesh points is 5mm. A smaller number can be used to make this part of the
   *                    calibration less time consuming. You will be running the nozzle down until it just barely
   *                    touches the glass. You should have the nozzle clean with no plastic obstructing your view.
   *                    Use caution and move slowly. It is possible to damage your printer if you are careless.
   *                    Note that this command will use the configuration #define SIZE_OF_LITTLE_RAISE if the
   *                    nozzle is moving a distance of less than BIG_RAISE_NOT_NEEDED.
   *
   *                    The H parameter can be set negative if your Mesh dips in a large area. You can press
   *                    and hold the LCD Panel's encoder wheel to terminate the current Phase 2 command. You
   *                    can then re-issue the G29 P 2 command with an H parameter that is more suitable for the
   *                    area you are manually probing. Note that the command tries to start you in a corner
   *                    of the bed where movement will be predictable. You can force the location to be used in
   *                    the distance calculations by using the X and Y parameters. You may find it is helpful to
   *                    print out a Mesh Map (G29 T) to understand where the mesh is invalidated and where
   *                    the nozzle will need to move in order to complete the command. The C parameter is
   *                    available on the Phase 2 command also and indicates the search for points to measure should
   *                    be done based on the current location of the nozzle.
   *
   *                    A B parameter is also available for this command and described up above. It places the
   *                    manual probe subsystem into Business Card mode where the thickness of a business card is
   *                    measured and then used to accurately set the nozzle height in all manual probing for the
   *                    duration of the command. (S for Shim mode would be a better parameter name, but S is needed
   *                    for Save or Store of the Mesh to EEPROM)  A Business card can be used, but you will have
   *                    better results if you use a flexible Shim that does not compress very much. That makes it
   *                    easier for you to get the nozzle to press with similar amounts of force against the shim so you
   *                    can get accurate measurements. As you are starting to touch the nozzle against the shim try
   *                    to get it to grasp the shim with the same force as when you measured the thickness of the
   *                    shim at the start of the command.
   *
   *                    Phase 2 allows the T (Map) parameter to be specified. This helps the user see the progression
   *                    of the Mesh being built.
   *
   *   P3    Phase 3    Fill the unpopulated regions of the Mesh with a fixed value. There are two different paths the
   *                    user can go down. If the user specifies the value using the C parameter, the closest invalid
   *                    mesh points to the nozzle will be filled. The user can specify a repeat count using the R
   *                    parameter with the C version of the command.
   *
   *                    A second version of the fill command is available if no C constant is specified. Not
   *                    specifying a C constant will invoke the 'Smart Fill' algorithm. The G29 P3 command will search
   *                    from the edges of the mesh inward looking for invalid mesh points. It will look at the next
   *                    several mesh points to determine if the print bed is sloped up or down. If the bed is sloped
   *                    upward from the invalid mesh point, it will be replaced with the value of the nearest mesh point.
   *                    If the bed is sloped downward from the invalid mesh point, it will be replaced with a value that
   *                    puts all three points in a line. The second version of the G29 P3 command is a quick, easy and
   *                    usually safe way to populate the unprobed regions of your mesh so you can continue to the G26
   *                    Mesh Validation Pattern phase. Please note that you are populating your mesh with unverified
   *                    numbers. You should use some scrutiny and caution.
   *
   *   P4    Phase 4    Fine tune the Mesh. The Delta Mesh Compensation System assume the existence of
   *                    an LCD Panel. It is possible to fine tune the mesh without the use of an LCD Panel.
   *                    (More work and details on doing this later!)
   *                    The System will search for the closest Mesh Point to the nozzle. It will move the
   *                    nozzle to this location. The user can use the LCD Panel to carefully adjust the nozzle
   *                    so it is just barely touching the bed. When the user clicks the control, the System
   *                    will lock in that height for that point in the Mesh Compensation System.
   *
   *                    Phase 4 has several additional parameters that the user may find helpful. Phase 4
   *                    can be started at a specific location by specifying an X and Y parameter. Phase 4
   *                    can be requested to continue the adjustment of Mesh Points by using the R(epeat)
   *                    parameter. If the Repetition count is not specified, it is assumed the user wishes
   *                    to adjust the entire matrix. The nozzle is moved to the Mesh Point being edited.
   *                    The command can be terminated early (or after the area of interest has been edited) by
   *                    pressing and holding the encoder wheel until the system recognizes the exit request.
   *                    Phase 4's general form is G29 P4 [R # of points] [X position] [Y position]
   *
   *                    Phase 4 is intended to be used with the G26 Mesh Validation Command. Using the
   *                    information left on the printer's bed from the G26 command it is very straight forward
   *                    and easy to fine tune the Mesh. One concept that is important to remember and that
   *                    will make using the Phase 4 command easy to use is this:  You are editing the Mesh Points.
   *                    If you have too little clearance and not much plastic was extruded in an area, you want to
   *                    LOWER the Mesh Point at the location. If you did not get good adheasion, you want to
   *                    RAISE the Mesh Point at that location.
   *
   *
   *   P5    Phase 5    Find Mean Mesh Height and Standard Deviation. Typically, it is easier to use and
   *                    work with the Mesh if it is Mean Adjusted. You can specify a C parameter to
   *                    Correct the Mesh to a 0.00 Mean Height. Adding a C parameter will automatically
   *                    execute a G29 P6 C <mean height>.
   *
   *   P6    Phase 6    Shift Mesh height. The entire Mesh's height is adjusted by the height specified
   *                    with the C parameter. Being able to adjust the height of a Mesh is useful tool. It
   *                    can be used to compensate for poorly calibrated Z-Probes and other errors. Ideally,
   *                    you should have the Mesh adjusted for a Mean Height of 0.00 and the Z-Probe measuring
   *                    0.000 at the Z Home location.
   *
   *   Q     Test       Load specified Test Pattern to assist in checking correct operation of system. This
   *                    command is not anticipated to be of much value to the typical user. It is intended
   *                    for developers to help them verify correct operation of the Unified Bed Leveling System.
   *
   *   R #   Repeat     Repeat this command the specified number of times. If no number is specified the
   *                    command will be repeated GRID_MAX_POINTS_X * GRID_MAX_POINTS_Y times.
   *
   *   S     Store      Store the current Mesh in the Activated area of the EEPROM. It will also store the
   *                    current state of the Unified Bed Leveling system in the EEPROM.
   *
   *   S #   Store      Store the current Mesh at the specified location in EEPROM. Activate this location
   *                    for subsequent Load and Store operations. Valid storage slot numbers begin at 0 and
   *                    extend to a limit related to the available EEPROM storage.
   *
   *   S -1  Store      Store the current Mesh as a print out that is suitable to be feed back into the system
   *                    at a later date. The GCode output can be saved and later replayed by the host software
   *                    to reconstruct the current mesh on another machine.
   *
   *   T     Topology   Display the Mesh Map Topology.
   *                    'T' can be used alone (e.g., G29 T) or in combination with most of the other commands.
   *                    This option works with all Phase commands (e.g., G29 P4 R 5 T X 50 Y100 C -.1 O)
   *                    This parameter can also specify a Map Type. T0 (the default) is user-readable. T1 can
   *                    is suitable to paste into a spreadsheet for a 3D graph of the mesh.
   *
   *   U     Unlevel    Perform a probe of the outer perimeter to assist in physically leveling unlevel beds.
   *                    Only used for G29 P1 T U. This speeds up the probing of the edge of the bed. Useful
   *                    when the entire bed doesn't need to be probed because it will be adjusted.
   *
   *   V #   Verbosity  Set the verbosity level (0-4) for extra details. (Default 0)
   *
   *   W     What?      Display valuable Unified Bed Leveling System data.
   *
   *   X #              X Location for this command
   *
   *   Y #              Y Location for this command
   *
   *
   *   Release Notes:
   *   You MUST do M502, M500 to initialize the storage. Failure to do this will cause all
   *   kinds of problems. Enabling EEPROM Storage is highly recommended. With EEPROM Storage
   *   of the mesh, you are limited to 3-Point and Grid Leveling. (G29 P0 T and G29 P0 G
   *   respectively.)
   *
   *   When you do a G28 and then a G29 P1 to automatically build your first mesh, you are going to notice
   *   the Unified Bed Leveling probes points further and further away from the starting location. (The
   *   starting location defaults to the center of the bed.)   The original Grid and Mesh leveling used
   *   a Zig Zag pattern. The new pattern is better, especially for people with Delta printers. This
   *   allows you to get the center area of the Mesh populated (and edited) quicker. This allows you to
   *   perform a small print and check out your settings quicker. You do not need to populate the
   *   entire mesh to use it. (You don't want to spend a lot of time generating a mesh only to realize
   *   you don't have the resolution or zprobe_zoffset set correctly. The Mesh generation
   *   gathers points closest to where the nozzle is located unless you specify an (X,Y) coordinate pair.
   *
   *   The Unified Bed Leveling uses a lot of EEPROM storage to hold its data. And it takes some effort
   *   to get this Mesh data correct for a user's printer. We do not want this data destroyed as
   *   new versions of Marlin add or subtract to the items stored in EEPROM. So, for the benefit of
   *   the users, we store the Mesh data at the end of the EEPROM and do not keep it contiguous with the
   *   other data stored in the EEPROM. (For sure the developers are going to complain about this, but
   *   this is going to be helpful to the users!)
   *
   *   The foundation of this Bed Leveling System is built on Epatel's Mesh Bed Leveling code. A big
   *   'Thanks!' to him and the creators of 3-Point and Grid Based leveling. Combining their contributions
   *   we now have the functionality and features of all three systems combined.
   */

It was not intentionally left out. The UBL menu system has still got that new car smell.

Heck it could be just an indicator of Z for the most part.

I think just showing Z centered in the LCD is best/clearest. Can't imagine anyone will care what X and Y are.

Like: 'Z: +0.250 mm'

@bgort I think you are on the right track. Z is plenty

And actually... It is so small in size it might actually make sense to keep it around especially for small 128 KB processors.

Good point. Although, without adding any other bells and whistles, all the original bed leveling systems come in at a pretty small size. Here are some current build sizes…

Default config
Program:   52744
Data:       2615

ABL 3-point, Probe Manually
Program:   59664 (+6920)
Data:       2723 (+108)

Mesh Bed Leveling
Program:   60660 (+7916)
Data:       2707 (+92)

ABL Bilinear, Probe Manually
Program:   65190 (+12446)
Data:       2795 (+180)

ABL Linear, Probe Manually
Program:   69580 (+16836)
Data:       2872 (+257)


Default plus G3D_PANEL
Program:   81366
Data:       2924

ABL 3-point, Probe Manually, LCD_BED_LEVELING
Program:   90008 (+8642)
Data:       3046 (+122)

Mesh Bed Leveling
Program:   92670 (+11304)
Data:       3021 (+97)

ABL Bilinear, Probe Manually, LCD_BED_LEVELING
Program:   96442 (+15076)
Data:       3118 (+194)

ABL Linear, Probe Manually, LCD_BED_LEVELING
Program:  100232 (+18866)
Data:       3195 (+271)

I have a question about manually doing probing until this menu item is working completely. I'm still using 1.1.3 and I got the manual instructions from this thread and the other one opened by @WheresWaldo, so I'm doing:

G28
G29 I 999
G29 P2 B
etc.

My question is that when I finish a homing (G28). The Z axis is at my M851 Z probe offset of 2.8. Before I issue the G29 commands, should I manually move the Z to 0? It seems like when I start the G29 P2 B command, on the first point, I have to crank the Z axis down to compensate for the offset, but then for the rest I don't.

In the old mesh bed leveling I believe that after the mesh was created, it would start automatically moving the Z to 0 after homing and maybe this will do the same once I have a mesh saved, but on the first try, do I need to manually do this?

Yes.... That sequence of commands should let you build a mesh manually. You will also notice other differences. It will probe the thickness of the business card or shim you are using. It is also going to probe the bed's mesh points in a different order.

But... You will be able to build a mesh, save it, and edit it to further refine it.

so once you get this all up and running what should starting gcode look like?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pubalan12 picture pubalan12  ·  4Comments

ceturan picture ceturan  ·  4Comments

heming3501 picture heming3501  ·  4Comments

W8KDB picture W8KDB  ·  4Comments

jerryerry picture jerryerry  ·  4Comments