G28, G29, G31, & G32 Relationship w/ Probe
-
@elli said in G28, G29, G31, & G32 Relationship w/ Probe:
You normally would not be setting baby-stepping in your config.g file, it's something you do while watching the first layer printing.
- When calibrating the Z offset for a probe, does the current G31 z offset need to be set to zero first?
No
- After changing the z value of G31 in the config, do I need to re-run g29 and get a new heightmap?
When creating a heightmap you always need to first set the Z=0 Datum using a single G30 at a fixed XY location. It can be one of the probe points used when creating your height map or it can be the center of the bed. Regardless of what point you use it must always be the same point. Changing the Z Trigger Height in G31 requires setting the Z=0 Datum again and thus requires creating a new height map
- After each g28, my x gantry becomes crooked, and a G32 is necessary. However, if I run a macro to raise and lower the gantry 150 mm 10 times, a g32 reports the gantry is level (within .002 mm). Is there something wrong with my homeall?
I've never found it necessary to change speed when using a Z probe. To get greater accuracy you can adjust the S parameter in your M558 or you can force averaging of a fixed number of probes by setting A to the number of probes and S to -1.
- Should I be re-establishing my z0 through after g32?
Yes. You need to set the Z=0 Datum after using G32 to level the bed or before using G29 to create/load your height map.
- Is there a way to verify that G29 movements are occurring outside of just eyeballing my motors?
Yes but G29 has been verified by others as working correctly.
- Is my process for establishing my z offset/bed level/print start problematic?
- Shouldn't my G29 heightmap have a z value of 0 at the point that I established my z-offset?
Don't know what you mean by "established by z-offset".
You may want to use this approach to leveling your bed with G32 - this is my code cut down to the essentials:
M671 X-180:0:180 Y-65:130:-65 S3 ; positions of ball studs ; --- level bed leveling --- while true ; run leveling pass ; --- probe near ball studs --- G30 P0 X-145 Y-65 Z-99999 ; probe near ball stud #1 G30 P1 X0 Y100 Z-99999 ; probe near ball stud #2 G30 P2 X145 Y-65 Z-99999 S3 ; probe near ball stud #3 ; check results - exit loop if results are good if move.calibration.initial.deviation < 0.02 break ; check pass limit - abort if pass limit reached if iterations = 5 M291 P"Bed Leveling Aborted" R"Pass Limit Reached" abort "Bed Leveling Aborted - Pass Limit Reached" ; --- finish up --- ; --- set Z=0 datum which can be affected by leveling --- M98 P"center_probe.g" ; position for probing G30 ; do single probe which sets Z to trigger height of Z probe
-
@fcwilt Thanks for the response. Going to play with this and may have further questions.
-
@fcwilt I've made some small changes to my approach.
my bed.g now looks like this:
; bed.g ; called to perform automatic bed compensation via G32 ; ; generated by RepRapFirmware Configuration Tool v3.1.3 on Thu Jun 11 2020 21:09:00 GMT-0500 (Central Daylight Time) M561 ; turns off mesh compensation G1 Z5 G30 P0 X10 Y130 Z-99999 G30 P1 X270 Y130 Z-99999 S2 G1 X151 Y168 G30
and my heightmap looks better. However, I'm still seeing issues in which all of my prints start with the nozzle scraping the bed. I would post more reference code in here, but frankly at this point I don't know where I would look to understand why this is happening.
-
@elli said in G28, G29, G31, & G32 Relationship w/ Probe:
S.07
S0.07 is actually less strict a tolerance than the default. I suggest you remove that part entirely. If you're going to use the A value to force it to probe twice, you should at least let it get some accuracy out of it instead of accepting a looser range of repeatability.
If you notice that you need to baby step up by the same amount each time after fixing that S value, then you can simply modify your G31 Z value to take that amount into effect. If Z0.926 is too close to the bed, reduce it by the amount you are baby stepping.
Also a dive speed of 900 may be too fast to get a good probe resolution. Try M558 F300 instead and see if you get better accuracy.
-
@phaedrux Made those changes, but still seeing the nozzle entirely too close to the bed. After the above steps, the number I'm getting from my g30 s-1 is 1.631, which is what I'm putting as my g31 z value. With this, i have to baby step up about .46 mm because the nozzle is scraping the bed so hard. I'm just not understanding why my z probe calibration is deviating from the measured value by 25%. This feels like I'm doing something fundamentally wrong in my calibration, rather than need to make some minor changes.
-
@elli I'm having the same issue the other way, I manually set my z offset and manually level my bed and I can print fine. But if I do a G29 and generate a height map I get a warning that the offset (that I just printed with correctly manually) is too large. The map that it creates is level. BUT all points are floating above zero .02. to.15 depending on the mood it seems. And if I apply the height map of course it prints too high.
I'm at a total loss I've been printing with this config for while now don't know what I did to mess up G29. Feeling really dumb, whatever is causing it I cant see it--- Following and going over my settings as well.
-
Have you re-created the heightmap after making those changes?
Are you clearing your heightmap before doing your G30 S-1 test? -
@elli said in G28, G29, G31, & G32 Relationship w/ Probe:
@phaedrux Made those changes, but still seeing the nozzle entirely too close to the bed. After the above steps, the number I'm getting from my g30 s-1 is 1.631, which is what I'm putting as my g31 z value. With this, i have to baby step up about .46 mm because the nozzle is scraping the bed so hard. I'm just not understanding why my z probe calibration is deviating from the measured value by 25%. This feels like I'm doing something fundamentally wrong in my calibration, rather than need to make some minor changes.
To get accurate results from G30 S-1 you have to already have your logical Z position matching the actual Z position.
If that match is off G30 S-1 will return an incorrect value.
You can always resort to trial and error.
- set the Z=0 Datum at your standard XY point
- after it has finished probing the reported Z position should be the sum of the M558 H parameter and the G31 Z parameter
- move the nozzle to that XY point
- with something like my 1mm thickness gauge execute a G1 Zn at some slow speed where n is the thickness of your object
- check the gap between the nozzle and the bed
- if it is too large increase the G31 Z parameter by the difference - if it is too small decrease the parameter by the difference.
Repeat until you find the correct value for the Z parameter
-
@fcwilt Sure, I can resort to trial and error, but I'm not understanding why my process is not resulting in a meaningful outcome. Rather than brute forcing this, I'd like to understand what I'm doing wrong so that I may correct it and the machine operates as expected.
-
@elli said in G28, G29, G31, & G32 Relationship w/ Probe:
@fcwilt Sure, I can resort to trial and error, but I'm not understanding why my process is not resulting in a meaningful outcome. Rather than brute forcing this, I'd like to understand what I'm doing wrong so that I may correct it and the machine operates as expected.
Well the normal approach relies on there being a fixed physical relationship in the Z axis of the Z probe and tool nozzle which is complicated a bit with multiple tools.
Thus I think it is best to set the Z offset of tool 0 to 0 to keep things simple and use tool 0 for determining the Z probe Z Trigger Height setting needed in G31.
The Z offset of all other tools can be set in relation to tool 0.
You set the logical Z position (what the firmware "thinks" the Z position is) to match the actual Z position by jogging the nozzle down until it is just touching the bed or some thickness gauge type object and set the logical Z position using G92 Zn where n is the thickness of the object or 0 if you didn't use one.
Once the logical position matches the physical position then you can use G30 S-1 to determine the Z Trigger Height setting you would use in G31.
Once you have set the G31 Z Trigger Height setting you can then set the Z=0 Datum using G30 and then verify that Z=0 actually has the nozzle just touching the bed.
It is common for folks to have the G31 command in config.g which means config.g needs to be executed to apply the new setting.
I use a different approach in that I have a file called config_probe.g which contains the M558 and G31 commands needed to configure the Z probe. I invoke that file whenever I want to insure the Z probe is using the most recent settings. Using M98 P"config_probe.g" in config.g insures the Z probe is setup on printer boot/reboot.
For testing I have a DWC Macro which contains M98 P"config_probe.g" so I can quickly and easily apply any new settings entered into the config_probe.g file.
Frederick
-
@elli maybe the temperature of the nozzle is the reason, is it cold at calibration? It will expand by about 0.2 mm at 200 °C increase if the hotend is 50 mm long. ( https://forum.duet3d.com/topic/8779/z-offset-depending-on-hotend-temp-setting/4 )
-
@joergs5 This has definitely helped, although I'm still seeing some issues.
@fcwilt @Phaedrux is there anything that can be gleaned from the fact that my mesh is a "saddle" shape? I've tinkered with my z probe trigger height and the conditions under which I establish my Z=0 Datum, but I've also noticed that there is a fair deviation in trigger height at different points on the bed, roughly .2mm of deviation. When reviewing this document it states that the z trigger height should not very significantly in different XY positions. I have no way of altering the surface of the bed mechanically.
Regarding the z trigger height variations, I'm confident that my z probe is not under any stress causing it to move independently of the toolhead and I believe the EZABL probe is parallel to the bed (although I've been told that having a minute angle in the orientation of the probe to the bed isn't a huge deal?). What other things can I verify/assess to understand what might be causing the inconsistencies in my z trigger height?
I have a small concern that my x gantry is sagging, but this is only from looking at the mesh data, this is the only thing I can seem to think of that would lead to such significant variation. I'm about to get a camera set up to take photos of the profile of the gantry in relation to the bed at different x coordinates to see if there is sag when the toolhead is in the middle of the gantry, but not sure where else to go at this moment.
-
I've only seen one image of your mesh and it looks pretty good except I would suspect that you didn't set the Z=0 datum prior to creating the mesh.
Do you have a more recent image done at temp and with the setting of the Z=0 datum?
Frederick
-
Sag in the gantry can be a bit harder to deal with since it can have the effect of altering the trigger height as the probe moves across the arc of the sag. If that is the case you could measure the trigger height at the center of the bed and the trigger height at the edge of the x gantry to see how much it varies. Then you could try altering the heightmap points by hand to account for that trigger height variation.
-
My z=0 point is meant to be 131,125, and currently is reporting a z value of -.024.
here is my heightmap.csv:
-0.129, -0.184, -0.204, -0.224, -0.244, -0.249, -0.254, -0.279, -0.274, -0.269, -0.244, -0.244, -0.224, -0.194, -0.169 -0.094, -0.124, -0.139, -0.159, -0.179, -0.184, -0.199, -0.229, -0.229, -0.214, -0.194, -0.199, -0.184, -0.169, -0.139 -0.054, -0.104, -0.109, -0.114, -0.129, -0.134, -0.159, -0.194, -0.194, -0.179, -0.154, -0.164, -0.149, -0.139, -0.114 -0.019, -0.039, -0.039, -0.029, -0.029, -0.039, -0.079, -0.124, -0.129, -0.114, -0.094, -0.094, -0.084, -0.084, -0.069 0.026, -0.014, -0.014, 0.001, 0.011, -0.004, -0.044, -0.089, -0.094, -0.089, -0.069, -0.059, -0.049, -0.059, -0.039 0.061, 0.041, 0.051, 0.056, 0.051, 0.036, 0.001, -0.044, -0.049, -0.044, -0.019, -0.019, -0.014, -0.029, -0.009 0.096, 0.051, 0.051, 0.051, 0.036, 0.026, -0.004, -0.044, -0.039, -0.024, 0.001, -0.009, -0.009, -0.019, 0.001 0.111, 0.091, 0.091, 0.081, 0.061, 0.046, 0.016, -0.024, -0.014, 0.006, 0.026, 0.016, 0.011, -0.004, 0.021 0.121, 0.081, 0.076, 0.056, 0.026, 0.011, -0.004, -0.039, -0.024, -0.009, 0.016, 0.011, 0.001, -0.004, 0.021 0.106, 0.086, 0.076, 0.061, 0.031, 0.021, 0.001, -0.029, -0.024, 0.001, 0.041, 0.021, 0.001, 0.001, 0.026 0.086, 0.036, 0.021, 0.006, -0.019, -0.019, -0.034, -0.054, -0.034, -0.009, 0.021, 0.001, -0.014, -0.009, 0.031 0.046, 0.021, 0.006, -0.009, -0.029, -0.029, -0.044, -0.064, -0.044, -0.019, 0.006, -0.024, -0.014, -0.004, 0.031 0.011, -0.044, -0.064, -0.084, -0.094, -0.094, -0.104, -0.124, -0.109, -0.089, -0.064, -0.059, -0.029, -0.014, 0.031 -0.039, -0.069, -0.089, -0.104, -0.124, -0.124, -0.144, -0.164, -0.154, -0.139, -0.104, -0.094, -0.054, -0.034, 0.006 -0.089, -0.144, -0.164, -0.184, -0.204, -0.209, -0.219, -0.239, -0.219, -0.204, -0.169, -0.144, -0.104, -0.079, -0.029
-
Can you run this test print and see how your current mesh performs?
-
@phaedrux Can do. Will report back later. Having contractor work done in my workshop at the moment.
-
@elli said in G28, G29, G31, & G32 Relationship w/ Probe:
My z=0 point is meant to be 131,125, and currently is reporting a z value of -.024.
If the XY point used when setting the Z=0 Datum is one of the points in the grid the difference (in theory) should be zero.
Many things can cause that to not happen.
But 0.024 is not far off.
Frederick
-
@fcwilt said in G28, G29, G31, & G32 Relationship w/ Probe:
If the XY point used when setting the Z=0 Datum is one of the points in the grid the difference (in theory) should be zero.
Easiest way is to just pick a point from the mesh near the center of the bed, mouse over it and get the XY point coordinate and use that.
-
@phaedrux It seems to be working at this moment. I printed the STL that you sent over and seems to be behaving, although I'm still seeing very very slight variations in layer width across the bed, it's good enough for the time being to move forward and work on pinpointing some of these issues in getting my Z=0 datum set correctly.