Grid bed compensation
-
Chris, is that on a Duet WiFi or a wired Duet? Please run M122 and report the "Never used memory".
The date looks odd too.
-
Its on a wired duet 0.6
Date is as it was in the heightmap file, just a cut and paste.
-
Memory usage:
Program static ram used: 45740
Dynamic ram used: 41876
Recycled dynamic ram: 2496
Current stack ram used: 2856
Maximum stack ram used: 5288
Never used ram: 2904
Last reset 04:24:53 ago, cause: power up
Last software reset code & available RAM: 0x0003, 3404
Spinning module during software reset: GCodes -
So im trying to understand. Does this work as another form of bed leveling? By running this will the board adjust the tool movement, to compensate for the recorded data? Do I use this together with the standard auto calibration, in order to get better 1st layer? If so how do I make that work? Im using a delta machine if that helps at all.
-
Yes it levels the bed, really with the intention of allowing printing onto an uneven bed. In theory delta calibration compensates for a slightly non-level bed as long as the discrepancy is small, but grid levelling modifies the z coordinate depending on the x and y coordinate based on a map of the bed which can be a very large number of points. My bed is 330mm tooling plate and so very flat but I find since the autocalibration is close but not quite perfect I can now print near the edges and get a nice first layer everywhere. Perfect.
I am testing it with a large delta. Run your autocalibration first then run grid if you put the commands into your bed.g file when you run G32 from your start gcode, it does grid levelling after autocalibration. I think David is working on being able to load the grid from a file to speed up the process meaning it would only have to be done from time to time if the bed was moved/altered.
My bed.g looks like this:
[[language]] ; Auto calibration routine for delta printers M561 ; clear any bed transform, otherwise homing may be at the wrong height G31 X10 Y-5 ; don't want any probe offset for this G28 ; home the printer G28 ;home again in case of endstop problem ;slow down movement to improve accuracy and magnets holding M201 X500 Y500 Z500 E1000 ; Accelerations (mm/s^2) M203 X15000 Y15000 Z15000 E3600 ; Maximum speeds (mm/min) M566 X300 Y300 Z300 E1200 ; Maximum instant speed changes mm/minute ; Probe the bed and do 6- or 7-factor auto calibration positions are probe positions (x-13,y34) G30 P0 X0 Y110 Z-99999 ; middle G30 P1 X95.26 Y55 Z-99999 ; G30 P2 X95.26 Y-55 Z-99999 ; G30 P3 X0 Y-110 Z-99999 ; G30 P4 X-95.26 Y-55 Z-99999 ; G30 P5 X-95.26 Y55 Z-99999 ; G30 P6 X0 Y55 Z-99999 ; X tower inner G30 P7 X47.63 Y-27.50 Z-99999 ; Y tower inner G30 P8 X-47.63 Y-27.50 Z-99999 ; Z tower inner G30 P9 X0 Y0 Z-99999 S7 ; centre, and auto-calibrate 7 factors, rod length calib unreliable? ;restore speed settings to normal printing speeds M201 X3000 Y3000 Z3000 E1000 ; Accelerations (mm/s^2) M203 X15000 Y15000 Z15000 E3600 ; Maximum speeds (mm/min) M566 X1200 Y1200 Z1200 E1200 ; Maximum instant speed changes mm/minute M557 R140 S60 ;define levelling grid G29 ;probe levelling grid G1 X0 Y0 Z75 F7500 ; get the head out of the way of the bed
Ignore the bit about speeds, I slow down my printer considerably for autocalibration then speed it up again.
The key bit is the M557 R is radius and S is how far apart the points are. Make sure your radius does not allow the effector to hit anything.
G29 then runs the grid levelling. -
This was asked earlier, but I didn't catch an answer - does the height map fix only the first layer, couple layers, etc, or is it used through the entire print? What's the actual effect of using this on the prints?
-
Currently it is used throughout the entire print. On my list is to phase it out over a configurable height.
-
Which movement speed setting should I change for the grid bed compensation probe? Does the M558 F and T parameters contribute to it?
-
Yes, they do.
-
I have a problem using the bed compensation. It does not seem to compensate, the print is too close to the bed on the back left and 'okish' on the front right, the bed is oviously not levelled, but neither the G30 compensation nor the G29 compensation has any effect on this, or is the effect just too minor to see a difference?
Here is a picture of it, the left was on the front right of the bed, it is a bit stringy, the right side was on the back left and is realy flat:
-
TwoThree suggestions:1. Check that the trigger height of whatever Z probe you are using is the same at back left, centre, and front right.
2. To check that the grid compensation is working:
(a ) On a Cartesian printer you should be able to see the Z drive moving as you move the head in the XY plane
(b) Position the nozzle 1mm above bed centre. Check the height using feeler gauges. Then move the head to back left and check the height using feeler gauges again. Repeat for back right. Do this with and without bed compensation.
3. Make sure that you have entered the XY offset of your Z probe from your tool reference point (normally the nozzle in a single-nozzle machine) in your G31 command in config.g.
-
That's correct. I should get time to implement loading the height map from file later this week.
Any news?
-
The probe is setup in config.g with this:
G31 P500 X45 Y-25 Z0.30
But in bed.g I just found this:
G31 X0 Y0
I bet this is the problem…
-
I have only started to use this feature and have done my G29 run this is my results
RepRapFirmware height map file v1 mean error -0.54 deviation 1.21
xmin xmax ymin ymax radius spacing xnum ynum
-140 140.1 -140 140.1 150 20 15 15
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 -0.191 -0.328 -0.26 -0.152 -0.3 -0.169 -0.066 0 0 0 0
0 0 0 -0.197 -0.287 -0.25 -0.2 -0.153 -0.029 0.09 -0.154 -0.137 0 0 0
0 0 -0.008 -0.109 -0.325 -0.084 -0.11 -0.208 -0.019 -0.16 -0.16 -0.219 0.158 0 0
0 -0.3 -0.281 -0.075 -0.149 -0.216 -0.269 -0.148 -0.13 0.271 0.145 -0.005 0.145 0.243 0
0 -0.116 -0.191 -0.054 -0.139 -0.224 -0.134 -0.084 -0.055 -0.111 0.035 -0.079 -0.13 -0.009 0
0 -0.009 -0.188 -0.05 -0.155 -0.254 -0.175 -0.025 0 -0.196 0.004 -0.12 -0.076 -0.006 0
0 -0.075 0.01 -0.069 -0.13 -0.016 -0.006 -0.031 0.004 -0.301 0.126 -0.08 -0.05 -0.047 0
0 -0.022 -0.076 0.034 -0.17 0.019 0.01 0.055 -0.09 -0.091 -0.112 -0.009 0.003 -0.087 0
0 0.027 0.055 0.028 0.06 0.031 0.007 0.061 -0.133 -0.058 -0.076 -0.102 -0.124 -0.365 0
0 0.65 0.431 0.157 -0.255 -0.779 -1.455 -2.056 -2.79 -3.523 -4.16 -4.71 -5.471 -5.511 0
0 0 0.674 0.46 0.026 -0.577 -1.119 -1.67 -2.318 -2.956 -3.624 -4.385 -4.835 0 0
0 0 0 0.496 0.22 -0.201 -0.738 -1.281 -1.888 -2.495 -3.14 -3.17 0 0 0
0 0 0 0 0.39 -0.076 -0.361 -1.148 -1.526 -2.091 -3.021 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0could someone tell me if its good or not as I'm not too sure on what it all means, sorry for being stupid but this is all new to me
thanks
just ran another grid and reduced my bed radius from 150 to 120 and I have got this now
RepRapFirmware height map file v1, mean error -0.09, deviation 0.10
xmin,xmax,ymin,ymax,radius,spacing,xnum,ynum
-100.00,100.10,-100.00,100.10,120.00,20.00,11,11
0, 0, -0.196, -0.315, -0.176, -0.160, -0.045, 0.090, -0.139, 0, 0
0, -0.053, -0.321, -0.076, -0.081, -0.172, -0.027, -0.180, -0.171, -0.227, 0
-0.154, -0.110, -0.230, -0.230, -0.257, -0.160, -0.116, 0.259, 0.104, 0.007, 0.160
-0.209, -0.080, -0.116, -0.214, -0.115, -0.061, -0.085, -0.100, 0.036, -0.116, -0.134
-0.176, -0.061, -0.164, -0.255, -0.191, -0.030, -0.002, -0.214, 0.006, -0.191, -0.109
-0.011, -0.082, -0.181, -0.064, -0.037, -0.061, 0.000, -0.339, 0.059, -0.110, -0.073
-0.069, -0.075, -0.186, -0.010, -0.002, -0.025, -0.107, -0.141, -0.081, -0.030, -0.006
0.013, -0.005, 0.041, 0.013, 0.012, -0.009, -0.129, -0.101, -0.085, -0.121, -0.116
-0.110, -0.065, 0.016, -0.086, -0.038, 0.016, -0.059, -0.111, -0.064, -0.121, -0.140
0, -0.056, -0.059, -0.014, -0.045, -0.116, -0.109, -0.143, -0.134, -0.464, 0
0, 0, -0.130, 0.011, -0.056, -0.155, -0.096, -0.139, -0.189, 0, 0that's the best mean error I have ever had and lowest deviation I have ever had also I'm hoping that is pretty good lol
-
Guys, I'm trying to understand the process here.
is it
- Set z-probe trigger height & Figure out H value to put in the bed.g file for effector tilt
- run autocalc
- define the bed via M557 R85 S15
- run grid leveling via G29
- put G29 S1 at the end of bed.g to load the height map
- put G32 in your starting print script to activate auto-cal before prints
Is that correct?
RepRapFirmware height map file v1 generated at 2016-11-12 19:58, mean error -1.66, deviation 0.22 xmin,xmax,ymin,ymax,radius,spacing,xnum,ynum -75.00,75.10,-75.00,75.10,85.00,15.00,11,11 0, 0, 0, -1.640, -1.512, -1.474, -1.399, -1.340, 0, 0, 0 0, -1.497, -1.471, -1.486, -1.445, -1.539, -1.507, -1.448, -1.384, -1.259, 0 0, -1.663, -1.641, -1.696, -1.512, -1.516, -1.449, -1.359, -1.379, -1.288, 0 -1.572, -1.628, -1.666, -1.614, -1.615, -1.551, -1.540, -1.526, -1.403, -1.291, -1.172 -1.851, -1.815, -1.735, -1.775, -1.686, -1.685, -1.574, -1.550, -1.460, -1.365, -1.301 -1.899, -1.829, -1.798, -1.750, -1.749, -1.647, -1.561, -1.600, -1.536, -1.442, -1.324 -1.952, -1.951, -1.879, -1.979, -1.799, -1.747, -1.699, -1.604, -1.592, -1.463, -1.352 -2.037, -1.970, -1.973, -1.915, -1.866, -1.792, -1.791, -1.677, -1.623, -1.532, -1.449 0, -2.027, -1.987, -1.825, -1.899, -1.862, -1.824, -1.587, -1.612, -1.515, 0 0, -2.089, -2.052, -1.950, -1.984, -1.872, -1.821, -1.800, -1.677, -1.627, 0 0, 0, 0, -2.026, -2.065, -1.986, -1.765, -1.901, 0, 0, 0
my values seem a little crazy.
-
The reason they were all off by about 1.6 mm was because my z-height was too high. I have my z-height configured like this:
G31 X0 Y-8 Z0.84 P500 ; Set the zprobe height and threshold (put your own values here)
and i've doubled checked to make sure that is correct, which it is, so i'm not sure why after auto-cal it would make the z-value so off?
//// == was loading the previous grid compensation file that was way off, i still don't know why z went to high to begin with, though.
***derp
I've ran the autocal again, and now it seems like its a bit over 1mm to low this time ??Also, out of curiosity, after i ran the auto calibration and noticed it was too low, i ran G30-S1, the web interface shows z-height is 2.52, but the G-code console says stopped at height 0.834 mm
derp*** -
The probe is setup in config.g with this:
G31 P500 X45 Y-25 Z0.30
But in bed.g I just found this:
G31 X0 Y0
I bet this is the problem…
For 1.17rc1 you should remove the G31 command from bed.g, then change the XY coordinates of your probe points to account for the firmware applying the offset.
-
Also, out of curiosity, after i ran the auto calibration and noticed it was too low, i ran G30-S1, the web interface shows z-height is 2.52, but the G-code console says stopped at height 0.834 mm
derp***The value reported by G30 S-1 is the Z value without inverse bed compensation applied. So if bed compensation is active, the Z value reported by the web interface will be different. Perhaps I should have G30 S-1 report both figures.
-
Maybe, but is my process correct for doing the bed compensation? And why so I need to change my trigger height from what it reports after G31 S-1
That is very consistent at .84, but in order to print I have to add about .5mm to the trigger height. I am using glass with an aluminum heat spreader….
-
Yes your process is correct; but bear in mind that there are no H corrections for G29, so if you need to use a lot of H correction in bed.g then you will not get good G29 results.
I don't understand why you have that 0.5mm offset, assuming you have defined the G31 trigger height to be correct at/near the centre of the bed (so the H correction on the centre probe point is zero).