Welcome! Log In Create A New Profile

Advanced

UBL - how are probe points calculated?

Posted by jens53 
UBL - how are probe points calculated?
September 08, 2018 01:33PM
I am running Marlin 1.1.9 on a Creality CR-10s with a BLTouch probe.
I am trying to auto probe as much of the bed area as I can and am trying to fool the printer into going past the bed size (the mechanics allow the nozzle to go to x 319). Unfortunately, no matter what I try, the auto probing will not go to 319. The bed size has been specified as X 319 Y 300 and there is no inset specified for x max.
As part of trying to understand what UBL does, I thought I would record what x and y positions the automatic print routine goes to. I would have assumed that if I specify a 10 by 10 point matrix that the x probing would happen at minimum x (0) + mesh inset (5) - probe offset (-40). It does indeed start at the right location (45)
I then figured that to calculate the distance between probe points, that the UBL system would figure out the maximum point it could reach (319) and subtract the minimum point the nozzle could reach (0) divide that by 10 as I am calling for a 10 by 10 matrix (32) and derive the probe points from that.

This is what I get:

head position

x 45 63 81 100 118 136 154 173 191 209 x x offset = 40 inset 5 step size 18

y 14 47 80 112 145 178 211 243 276 y y offset = 9 inset 5 step size 33

It doesn't make sense to me. Neither the positions that are probed nor why I can't get to my end position makes sense.
I should add that in Marlin 1.1.8 I could fool the routine to probe at the full X position (X319) (the probing would happen at 319 - the probe offset of 40 or X279)

As I am looking at this, I am wondering if the above x and y positions are correct - I have been trying a number of different configurations and none have resulted in anything that makes sense so take these positions with a grain of salt and consider the bigger question as :

"how does Marlin determine which x and y positions it will probe" and
" how can I fool Marlin into probing the biggest area possible if I can physically exceed the print bed area with the nozzle"
Re: UBL - how are probe points calculated?
September 08, 2018 02:22PM
Further to my first post, I decided to simplify the issue and give some more details
Notice that even though a 3*3 mesh was called for, only 4 positions were probed. The high X and Y positions show as unreachable.

Any comment on why the high points are unreachable and/or how the probe locations are determined would be appreciated


#define X_PROBE_OFFSET_FROM_EXTRUDER -40
#define Y_PROBE_OFFSET_FROM_EXTRUDER -9
#define X_BED_SIZE 319
#define Y_BED_SIZE 300
#define X_MIN_POS 0
#define Y_MIN_POS 0
#define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
#define Z_MAX_POS 400
#define MESH_MIN_X MESH_INSET
#define MESH_MIN_Y MESH_INSET
#define MESH_MAX_X X_BED_SIZE
#define MESH_MAX_Y Y_BED_SIZE
#define GRID_MAX_POINTS_X 3
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X

Commands sent via command line in octoprint:

G28
g29 p1 g29 s1 g29 a m500

x/y coordinates visited as per LCD display

202/162
202/14
45/162
45/14

The high X and Y positions show as unreachable in the bed mesh
The minimum X and Y positions are obviously chosen so that combining the probe offset from the extruder location yields a probe point that falls at the mesh inset point (ie when the extruder is at 45/14 and the x/y mesh offset is 5/5 the probe is at 5/5 which is the first possible position it is allowed to be)

Edited 1 time(s). Last edit at 09/08/2018 02:30PM by jens53.
Re: UBL - how are probe points calculated?
September 08, 2018 11:54PM
Still struggling with this .....

An interesting observation though:
On a CR-10S with a 300 * 300 physical bed and a BLTouch
Bed is set at 300 * 300. Mesh max x is 300 mesh max y is 300
I set the probe offset to x0 and y 0 !!!!
The points probed are:
150/150
75/150
150/75
225/150
150/225
75/225
75/75
225/75
225/225

For some reason (and I suspect a bug), the automatic probing never ends up at x or y zero nor at x or y 300 !!!

It seems to me that if I have specified that the probe is at the same position as the extruder and that the extruder can cover from 0 to 300 in both axis, the probing routine should include x0 x300 y0 and y300 ....

Could somebody give me a reason why the autoprobing should not cover the extreme ends of the bed ?
Re: UBL - how are probe points calculated?
September 09, 2018 01:56AM
After a lot of screwing around, I have my answer!

I had MIN_PROBE_EDGE 5 set in configuration_h which would not allow a probe cycle at 0 or 300
The position for probing points is based on
(mesh_max - mesh_min)/ (# of probe points - 1)

For the result to be reachable it has to fall inside of mesh_max - mesh_min and it can not be in the min_probe_edge range

mesh_min and mesh_max reflect any configured mesh_inset parameters

I hope I got all that right in case anybody else gets confused about how the auto probing determins the points it uses
Re: UBL - how are probe points calculated?
October 02, 2018 09:41PM
I literally just signed up to say "Thank you!". Your explanation helped me to get UBL working properly on my printer.

While I generally find Marlin quite easy to configure, UBL configuration has been a real pain, confusing and somewhat counter intuitive.

Thanks again!
Sorry, only registered users may post in this forum.

Click here to login