MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.17k stars 19.21k forks source link

HELP UBL ! #9596

Closed ghost closed 6 years ago

ghost commented 6 years ago

@thinkyhead @Roxy-3D

Hi , UBL strange behavior outside of bedsize , up infinitly and more strange things, i have a purge bucket outside of the bed ' impossible to probe this void zone '

How to solve ? 1-) Enable/disable UBL by gcode when go out of boundaries " when go on pause zone ' but i don't know if it can resume perfectly the height when back to print 2-) Move to the limit and go on pause zone , to avoid interpolation of bedzone and nobedzone 3-) Add manually the bucket zone in probing points 4-) Is it fixed now , Need support , or any options for out of probed zone ?

Thanks

ghost commented 6 years ago

yes it changes shape , and the most common shape is because , the bed have fixation on the left and the right , the heat increase size of the bed , and force is applied on the fixation , the curve of the bed change , it's very light for eyes , but for a robotic nozzle absolutely perfect in an xy plan , you can be sure , in the center you have the nozzle that can not extrude , and in the corner the filament not glue to the bed It's why , you have to make the better probing .

ghost commented 6 years ago

it's why i just use 3 points matrix for ubl , one left , one center , one right , same for y axis , and it's enough , i don't have 32 bits computer so it's enough and works REALLY PERFECT

ghost commented 6 years ago

The curse of the perfect first layer , is madness , it's why i have my own limits !! lol

filipgoc commented 6 years ago

Right. I think for me it has not been as markant, as I don't have any machine with 400mm+ bed size and I use relatively thick aluminium (3+mm)...

But of COURSE it makes sense. I was blindsided by thinking about the probe to the point that I forgot about the bed.

Yet, this leaves the question of hotend.

Roxy-3D commented 6 years ago

The hot ends expand when heated. You can position your nozzle .05 mm above the unheated bed... And when you turn on the nozzle heat, it is very possible you will see the nozzle touch the glass.

However you calibrate your machine, you should do the same thing (every time) when printing. For me (and 80% or others) the preference is to get everything up to temperature, and then home and print. But some people prefer a different sequence just because a print typically starts with a G28 (Home) and stuff can be heating while that is in operation.

ghost commented 6 years ago

@Filipgoc , in robotic 0.1mm is STRONG , so , all the closest conditions of printing must be reproduced for probing , and , we are all agree that it's really not difficult to heat nozzles and bed , for probing , it's why , we make it , and it's sure we will have a really better and more precise mesh And no really a problem , because , i have made my mesh , a few month ago , and i still use it today , the mesh is not deleted when you upload a new firmware

UBL is the autolevel that can have a medal of honor because EXTRAORDINARY AND EASY ! And this is The @Roxy-3D creation Girlpower !

Updated wishes 1-) Lcd Fade height for UBL 2-) Nan/offmesh UBL bug 3-) Secure z height ( + disable when current z raise to the same value ) 'Not important you have the time'

Roxy-3D commented 6 years ago

2-) Nan/offmesh UBL bug

I believe this one is gone.

ghost commented 6 years ago

Coool 👍

I test it soon , it's easy for me to test , i have a dual extrusion print , with purging in an offmesh bucket , every tool change , you imagine 250 tests in one print lol

filipgoc commented 6 years ago

@Studiodyne @Roxy-3D Thanks for helping clarify the variables and the context of the heating or no-heating for probing!

The sequencing is worth thinking about. 99% of time I'm printing PETG or PLA these days. I'l looking for a compromise then:

I think what I'm gonna do in IN THE NAME OF UBL, all hail UBL, is this:

Generate the mesh at 170/60.

M104 S170   ; Hot enough so that leftover filament is soft and squished if necessary,
but no so much that it's oozing on my lovely PEI sheet. Mesh precision wise,
this doesn't matter because of babystepping. At this point we don't care. 
M190 S60    ; I don't normally print ABSes or polycarbonates, so this will
not be crazily off for by far most of my prints. 

Then, babystep at the very top of the range for PLA.

M109 S225
; print something and adjust the z height to perfection

And combine with such start gcode

G28         ; home
(G0 X_ Y_    ; get the nozzle off-platform. in my case, safe homing does that already.)
M109 S170   ; heat up to the mesh temp, also nice to wait at lower temp while the bed
is heating so we're not baking the nozzle
M140 S60    ; heat up to the mesh temp (not sure if M190 is necessary here. thinking not)
G28 Z       ; Re-home Z for an updated value
M109 S{print temp} ; finish the heat up
M190 R{print temp} ; finish the heat up
; here, wipe nozzle if you have a nozzle wiper
; print
M117 Print starting
Roxy-3D commented 6 years ago

And I know people are tired of hearing it... But Turning on the DOUBLECLICK_FOR_Z_BABYSTEPPING makes it much easier to get a perfect first layer independent of temperature. As the printer is drawing the skirt, You just adjust the nozzle so you are getting the right amount of 'squish' to line being put down.

Probably it makes sense to have a perfectly calibrated machine for the filament you usually use. But when you switch to another filament type for a print... DOUBLECLICK_FOR_Z_BABYSTEPPING will make it so that print turns out OK.

ghost commented 6 years ago

My own idea of ubl , is to never be loud , so i use only one mesh , at a high temp , nozzle 250/bed 110 , and I never want to make 1200 meshes that will never change something One mesh with heated machine and it's all and works perfect Like you I use , pet and pla , and PCMAX , because these three filamentare odorless !!!!!!!!!!!!!!!!!!!!!!

M104 S250
M190 S110 LCD 'make a cold mesh ' ' just a mesh to save , cold is not real ' LCD save on slot 0 LCD SAVE CONFIG And by usb ' FADE HEIGHT =1 or any value you want ' soon on LCD loll By usb too , i make long move g1 z0.5 ' because need to be under fade height ' g1 x1000y1000 to max the max long travel on the bed , WITH MY EYES , on the z axis to see correction

And it's all i do ! Do you think i'm enough mad to loose some hours just for making a pattern loll

For printing , i start the print , i double click i up to 3mm the baby stepping , ' GRAPHIC OVERLAY OPTION + AUTOSAVE OPTION ' When print begin , i set the height AND I USE THE PRINT EVERY DAY and i never make another mesh since on month and i never touch babystepping , except when i change nozzle size

ghost commented 6 years ago

And every day i thank roxy !!!!!!!!!!!

filipgoc commented 6 years ago

Oh I love me babystepping and double click (I also have an alternative menu with Z babystepping prominent) and I am used to adjusting when skirt is along the way.

But, I also like to have my printer quite far from me and on octoprint all the way until the print is done. It's a bit hard to see the first layer on a camera, so M290 wirelessly is of limited use. That's why I like to treat babystepping as a more of a setup procedure than a regular procedure.

Idea! I can make a mesh for every material (temp wise), save them to slots, and then add then load the meshes in the start gcode. I can make that part of the slicer to automatically switch gcode based on the material selected. Oh that's wicked.

But it sounds a bit complicated for beginners (which has to be my first priority). Also, I have multiple beds - different surfaces and different properties. Once I save meshes for various temps and beds I am getting too many meshes to 'set and forget'. Then I'm getting back to generating the mesh on the fly and no worries (other than adding two minutes to my print start procedure.)

ghost commented 6 years ago

@filipgoc Don't make the curse of the perfection , this technology will never be perfect , and to loose time to have perfection is not serious , with this technology , when you make a print , you don't know if the same next print will be the same , it's why i never waste my time , i know this technology will never give high quality result , and i just require a succes first layer , and a good machining and it's enough I see tons of mad guys that give their life for a beautifull print , and when they see my printed object they are jalous et think i have a secret My secret is simple , the printed object must be cooled , to be hard and to keep dimensions , and all the closed machine are not good for me I ONLY USE OPEN MACHINES, in the past we loved ABS , and it's true we needed high temp but now we know ABS IS SHIT and not made for printing , too much laminations and deformations My second secret is the linear advance , you set it by make square , and you set to have the perfect corners My third secret is FWRETRACT , to have the perfect recovery when the nozzle move and restart extrusion i set it in real time but , once you have the value , you never go back in settings AND IT S ALL YOU CAN MAKE

Roxy-3D commented 6 years ago

Also, I have multiple beds - different surfaces and different properties. Once I save meshes for various temps and beds I am getting too many meshes to 'set and forget'.

So do it logically... You know which materials you print with. For me, if I was going to save multiple mesh's, I would do

Also... On my glass sheets I have markers (on the bottom side) so I can get the glass back very close to where the measurements were originally done. When you have multiple pieces of glass for a printer, you can label those pieces of glass with the slot number for that particular piece of glass.

ghost commented 6 years ago

But if you love to make settings and love to test your machine , it's ok you can play lol

ghost commented 6 years ago

@Roxy-3D can you tell me what units i have to add to have ubl nan/off mesh bug fixed , for my own release, because i don't want the new update , i will wait the new linear advance and other fixes

filipgoc commented 6 years ago

Once you have multiple quick swap beds, then the multiple meshes turn into

slot 0 mesh at room temperature,  bed 1
slot 1 mesh at PLA temps (205),   bed 1
slot 2 mesh at ABS temps (225),   bed 1
slot 3 mesh at room temperature,  bed 2
slot 4 mesh at PLA temps (205),   bed 2
slot 5 mesh at ABS temps (225),   bed 2
etc...

I'm not saying we should do something else. Just examining the limits of workflows.

PS: I don't do this to find a perfection, but to make sure I'm setting up a properly thought out default workflow for the people that will learn how to do use UBL from me @Studiodyne. (Which is to say I agree with you in general. )

ghost commented 6 years ago

@filipgoc now , you have experience , and your job , is to transmit experience here , for the newbies We have given time to you , you have to promise , you will help newbies 👍

Roxy-3D commented 6 years ago

@filipgoc If you run out of storage slots... I'm not sure a mesh at room temp has much value.

@Studiodyne I think it is likely that if you disable SEGMENT_LEVELED_MOVES that will be enough to make the problem go away. But I added more code to make sure every path was covered.

ghost commented 6 years ago

What .h ? What .cpp ? I just want to update my own bugfix and i don't want to use a new updated release

Roxy-3D commented 6 years ago

it is in configuration.h

ManuelMcLure commented 6 years ago

I have a general question about UBL. I'm currently using bilinear leveling every time I start a print. I have a 220x220 bed (Anet A8) and an 18mm inductive sensor.

#define FIX_MOUNTED_PROBE
#define X_BED_SIZE 220
#define Y_BED_SIZE 220
#define X_MIN_POS -36
#define Y_MIN_POS -7
#define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
#define Z_MAX_POS 240
#define AUTO_BED_LEVELING_BILINEAR
#define X_PROBE_OFFSET_FROM_EXTRUDER 71   // X offset: -left  +right  [of the nozzle]
#define Y_PROBE_OFFSET_FROM_EXTRUDER -35   // Y offset: -front +behind [the nozzle]
#define Z_PROBE_OFFSET_FROM_EXTRUDER -0.75 // Z offset: -below +above  [the nozzle]
#define GRID_MAX_POINTS_X 3
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X
#define LEFT_PROBE_BED_POSITION 40
#define RIGHT_PROBE_BED_POSITION 200
#define FRONT_PROBE_BED_POSITION 20
#define BACK_PROBE_BED_POSITION 180
#define EXTRAPOLATE_BEYOND_GRID

Since I have an inductive probe, I make sure that the probe is at least 20mm in from the edge of the bed to ensure there's a nice chunky bit of aluminum under it, but the EXTRAPOLATE_BEYOND_GRID helps cover the cases outside the probable area giving me access to the whole bed.

Is there any way to get the same behavior using UBL? Essentially I want the mesh to cover the whole bed even though I'm only probing to within 20mm of the edge of the bed. If I set MESH_INSET to 20 I'll lose 20mm of printable area on each side of the bed, but if I set it to 0 it will want to probe the very edge of the bed which with an inductive probe is a problem. Should I just stay with Bilinear leveling for the moment? If this isn't possible, could there be an enhancement to add probe limits to G29 P1?

Roxy-3D commented 6 years ago

Is there any way to get the same behavior using UBL? Essentially I want the mesh to cover the whole bed even though I'm only probing to within 20mm of the edge of the bed.

Yes. This is no different than how a probe leg with a micro switch is handled. If there is any X or Y_PROBE_OFFSET_FROM_EXTRUDER, you will end up with unprobed mesh points. The simple answer is you do a 'Smart Fill' of them with a G29 P3. You then do a G26 Mesh validation pattern. and follow that with a G29 P4 to edit any spot that is not correct on the validation pattern.

ManuelMcLure commented 6 years ago

I understand that it takes into account the [XY]_PROBE_OFFSET_FROM_EXTRUDER and in my case that takes care of the probing on the left/back of the bed but I also want to make sure it doesn't probe the very edge of the bed on the front/right of the bed. The probe can physically reach those edges but is likely to be very inaccurate and trigger way too low (possibly even causing a nozzle crash) because there's not enough aluminum around it for proper inductive sensing. I want to tell UBL "don't probe all the way to the edge even if the probe can physically reach it" without using MESH_INSET and losing some of my build area, i.e. I want the completed mesh to go from [0,0] to [220, 220] (or maybe [5,5] to [215,215] for safety) but have G29 P1 only probe between (40, 20) and (200, 180).

However, a little digging into the code shows that you have already provided a way to do what I want, by just setting

#define MESH_MIN_X 40
#define MESH_MAX_X 200
#define MESH_MIN_Y 20
#define MESH_MAX_Y 180

in Configuration_adv.h. I somehow missed that in my earlier spelunking into the configuration of UBL. I think it might be time to give UBL another try (not that I have any problems with Bilinear).

Lutz1967 commented 6 years ago

@Roxy-3D

Is it OK to use MESH_INSET=20 and disable SEGMENT_LEVELED_MOVES to get no Z issue outside the defined mesh ?

Roxy-3D commented 6 years ago

Yes. Even though the nozzle can move across the entire bed... Setting a MESH_INSET tells UBL not to allow the nozzle to go right up to the edge of the bed. This is mostly for things like clamps to hold down a piece of glass to the bed. By setting a MESH_INSET, you can make sure the nozzle won't hit any clamps.

SEGMENT_LEVELED_MOVES is currently ignored by UBL (because it was calling the wrong motion routine). We will get that option back soon in UBL. (It really is a powerful feature!!!)

filipgoc commented 6 years ago

As response to @ManuelMcLure ,

I would also love to know how to set it up like he wants it. My nozzle and probe can go anywhere on the bed, but that's just unrealistic to probe .5mm from the edge. I also believe that UBL does not extrapolate beyond the mesh boundaries like bilinear does, so...

_? Are we doomed as of now to effectively make our corrected print area smaller by using UBL?_ (Compared to the bilinear ABL, as of now.)

I just did some testing:

I flashed a firmware with insane INSETS 0mm, but the MESH_MIN and MAX set to 70mm from the edge.

The probe does probe a small area in the middle, but then when observing the behavior with the mesh active, the areas off the middle were clearly not being compensated.

(G29 A, G0 X0, G0 X180 F1500 and observe the compensation.)

So, it seems that MESH_MIN_X (and all the other overrides) are just way to adjust the INSET to be uneven, and resizing the mesh smaller in the process.

Roxy-3D commented 6 years ago

I would also love to know how to set it up like he wants it. My nozzle and probe can go anywhere on the bed, but that's just unrealistic to probe .5mm from the edge.

So... go ahead and define the full bed size. If the points along the edge are not automatically probed accurately, don't sweat it. You can edit them to be correct later when you do a G26 followed by a G29 P4 R

If the probe is going to do bad things when it tries to probe next to the edge, you can still do the same thing as up above. But instead you start the process with a G29 P0 to clear the mesh. And then manually probe or fill in the edge values with values that raise the nozzle enough you won't have a problem doing the G26. Then auto probe the bed with G29 P1 C and continue with the mesh refinement.

ManuelMcLure commented 6 years ago

That procedure seems a little unintuitive and prone to error compared to allowing the user to define a probable area smaller than the mesh. If I forget to probe the edges before running G29 P1 and I have a small Z offset I'm pretty likely to end up with my nozzle hitting the bed, since an inductive sensor at the edge of the bed will tend to trigger lower than it does when there's plenty of metal around it.

Would you be amenable to considering a feature request to allow UBL to honor [LEFT|RIGHT|FRONT|BACK]_PROBE_POSITION when doing G29 P1? If so I'll enter one.

Roxy-3D commented 6 years ago

I'm hesitant to add options for that. If you set the bed size correctly, it will not probe off the bed. If your probe doesn't work well near the edges of the bed, you can adjust the bed size to a size where the probe works and the nozzle can also reach all locations.

ManuelMcLure commented 6 years ago

If your probe doesn't work well near the edges of the bed, you can adjust the bed size to a size where the probe works and the nozzle can also reach all locations.

But doesn't adjusting my bed size mean I'd lose printable area?

If so, it looks like my options are:

I think I'm going to take the last approach. Bilinear has been working well for me. I decided to test out UBL because I figured that it was where Marlin was moving towards in the future with respect with leveling and that it would get the most amount of development, but as it stands it's a big step backwards in ease-of-use for my specific circumstance (wanting to use the whole bed with an inductive probe).

filipgoc commented 6 years ago

As much as I LOVE UBL and think honestly it's the future of bed leveling, I am with Manuel here.

Without extrapolating the mesh beyond boundaries, it will be impossible to get a completely full access without fussy procedures, at least with an inductive probe.*

And, since that is not an issue with a more 'primitive' leveling system, it can be seen as a step back - as much as UBL is overall a massive step forward.

Let's focus on getting UBL stable first, then we can more it forward.

* (If we only get a full nozzle access by riding the probe to the very edge, then any slight misalignment or mis-sizing of beds, which in my case is quick swap for example, will mean a probing failure and driving the nozzle into the surface.)

Roxy-3D commented 6 years ago

Without extrapolating the mesh beyond boundaries, it will be impossible to get a completely full access without fussy procedures, at least with an inductive probe

I've been hesitant to do that because I'm worried about Delta's cup and bowl problem. At the Printable Radius, the curl of movement can be very extreme. Perhaps we can make the extrapolation off the mesh only for Cartesian machines. Or maybe make it a user selectable option where they can elect to turn it on.

filipgoc commented 6 years ago

@Roxy-3D Both are good points. As long as it is a config option, you should not worry too much about the cup and bowl. We can just add a warning for delta users to watch out.

It doesn't have to propagate to LCD or anything... if there is a simple #define EXTRAPOLATE_BEYOND_GRID_UBL, then everyone can make their choice according to their situation.

I'd vote for extrapolation. 👍 This may be the one thing that still keeps some of us sticking with ABL bilinear.

filipgoc commented 6 years ago

As in:


#if ENABLED(AUTO_BED_LEVELING_UBL)

    // Extrapolate the mesh beyond the probed area? This is useful if you really
    // want to reach the ultimate extremities of your plate, but you are unable
    // or hesitant to probe that close to the edges. 
    // Default is to not apply any mesh compensation beyond the probed area. 
    // WARNING for Delta users. Use with extreme caution if you have any problems
    // of the cup & bowl variety. At the Printable Radius, the curl of movement can become extreme. 

    #define EXTRAPOLATE_BEYOND_GRID_UBL
ghost commented 6 years ago

@Roxy-3D , yesterday , test of UBL , no offmesh bug , 200 moves out of mesh , zero problem ! But i have discover something , i have added the line to have zfadeheight with a MENUEDIT+float3+planner.zheight .Now i don't know if it's a little forgotten things or issue or need to be fixed , when someone make a LCD UBL , when mesh saved and UBL activated , fade height=0 no set to 10 'default' and we have to make it manually , but no LCD menu and forced to use ' USB ' The solution is to make a pr to have Z fade height menu that appears , because how many user will never see the z height compensation of their z axis , if fade height=0

Thks for this

ghost commented 6 years ago

@filipgoc It's true , the probing area is a real problem , in my situation i have made my machine with strong outside axis , and i can reach all the bed and more , but in the situation of already made printers , i suggest if you have bravery , to unmount your nozzle temporary , to place the sensor at the same place , and to make all your meshes , and once you have your meshes , you have finish with this adventure

It's just once , and for life , you can give a little time to do it :smile:

AnHardt commented 6 years ago

Wouldn't a additional ring of, not probable but editable, points around the current mesh avoid the extrapolation and replace it by meaningful data? These points could be preset by extrapolation.

filipgoc commented 6 years ago

it's just once...

Well, it's once for you, but not for me and others like me who have quick-swap build plates. (Or many printers for that matter. The more printers, the more maddening this becomes.) Add into it that, ideally, as we had discussed, you'd re-generate mesh for vastly different print temperatures, and you are pretty far from 'once' ¯_(ツ)_/¯ The discussion on adding some way to deal with this is underway in the meantime though, so I am happy.

ghost commented 6 years ago

quick swap okkkkkkkkkkk , it's every time lol The quick swap bed is the magnetic buildtak thin plate ? Give me a link i want to see what type of bed you have i have forgotten the idea of a swapping bed , because of the ubl remeshing
thks

ghost commented 6 years ago

@Roxy-3D , The ' alien ' thinkyhead have found the bug of BIG EDIT FONT and have patched it ...

Roxy-3D commented 6 years ago

Wouldn't a additional ring of, not probable but editable, points around the current mesh avoid the extrapolation and replace it by meaningful data? These points could be preset by extrapolation.

Yes. And I've been trying to get this in place for Delta's. In the Delta case, there naturally are extra mesh points outside of the Delta Printable Radius (except at the Max/Min X and Max/Min Y). And it is my belief these need to be easily edited.

If we are willing to burn some extra RAM for these mesh points, that is a very viable solution. BUT... If we do that... will people be coming back in two weeks saying "I can only go one mesh cell off of the bed... That sucks and I don't want to use UBL any more." ????? Do we then go to surrounding the bed with 2 rows of mesh cells?

filipgoc commented 6 years ago

"I can only go one mesh cell off of the bed... That sucks and I don't want to use UBL any more."

Hahaha. Unfortunately, maybe. Shoot for the 80/20 rule then?

The main reason is to give easy way to provide compensation to the very edge of the plate. If one cell is enough to cover this depends on the density of probing and how far off edge we are probing.

Another reason could be to have compensation all the way to something like nozzle wiping gizmos or purge towers, but that should be fine without compensation I feel.

So... one cell should make it possible for many people to handle the edge state with automatic probes - given that they make their own choice on the density of the mesh and probing insets. There will be outliers. 2 cells would probably catch at least 80% of all cases, would be my guess. Beyond that... not sure.

Maybe it still is a slippery slope of ram usage.

Roxy-3D commented 6 years ago

With 1 extra row (or column) of mesh cells... The bed could be positioned such that the official area starts 1/2 into the first mesh cell. And it would continue 1/2 into the last mesh cell of the row (or column). That would be a minimal increase in RAM size.

But it maybe it would be more clean to have the extra mesh cells totally off the bed. The big problem with doing that is those mesh points can not be auto probed. They are off the bed. They would all need to be manually edited to have meaningful data.

It is possible we could have a user #define specify how many rows (or columns) of mesh cells off the bed are desired. If they wanted 2, they could specify that. But once again, that is a lot of manually entered data.

In the mean time... Until this gets thought out better, it probably isn't that hard to get the code to extrapolate the nearest mesh value outwards off the mesh. That would provide some relief while a better solution is figured out. Probably it would make sense to make that user configurable.

ManuelMcLure commented 6 years ago

I think it still makes sense to have an option to limit the probable area so you can have actual mesh points near the edge of the bed that can be initialized with G29 P3 and fine tuned with G29 P4 without running the risk of probing too close to the edge of the bed.

In my ideal world, you'd specify X_BED_SIZE, Y_BED_SIZE, optionally MESH_INSET, [XY]_OFFSET_FROM_EXTRUDER, and the bed probe limits, and then:

github-actions[bot] commented 3 years ago

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.