Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Grid bed compensation

    Scheduled Pinned Locked Moved
    Firmware wishlist
    23
    100
    19.6k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ronnien59undefined
      ronnien59
      last edited by

      @dc42:

      @ronnien59:

      @ronnien59:

      I am trying to run the grid bed compensation, however when i run the G29 I get:

      7:10:20 PM G29 Error: No valid grid defined for G29 bed probing
      7:04:32 PM G29 Error: No valid grid defined for G29 bed probing

      I have placed M557 X10:250 Y40:260 S40 in my config.g.
      Would like to get this working but do not know enough about it

      I was able to run it but had to use the PanelDue to run it it would not run over the wifi??

      Perhaps you didn't restart the Duet after editing config.g?

      You can run M557 with no parameters to check that the grid is defined.

      That must have been it. I thought I had restarted. running fine this morning.

      1 Reply Last reply Reply Quote 0
      • chriscainundefined
        chriscain
        last edited by

        Erm!!!

        Bed probe has been working great with grid of S40 and S20,
        Though I would try a "high res" probe to see how flat the bed was rather than just how level
        so tried a S15 grid which at 100 points maxes the grid on my duet 0.6
        an got..
        RepRapFirmware height map file v1 generated at 0116-10-30 12:17
        xmin,xmax,ymin,ymax,radius,spacing,xnum,ynum
        40.00,180.00,30.00,170.00,-1.00,15.00,10,10
        0.017,0.103,0.102,0.094,0.089,0.092,0.129,0.105,0.100,0.112
        0.025,0.116,0.067,0.094,0.125,0.118,0.020,0.086,0.049,0.064
        0.084,0.119,0.149,0.122,0.123,0.112,0.087,0.052,0.059,0.129
        0.061,0.081,0.111,0.091,0.147,0.123,0.101,0.082,0.052,0.092
        0.156,0.143,0.127,-0.016,0.100,0.094,0.056,0.081,0.059,0.038
        0.201,0.144,0.116,0.030,0.062,-0.057,0.008,-0.012,0.029,0.035
        0.200,0.139,-0.027,0.060,0.057,-0.079,-0.069,-0.030,-0.026,0.001
        0.185,0.103,-0.002,0.223,0.030,0.028,0.010,-0.002,-0.021,-0.005
        0.116,0.126,0.135,0.086,0.082,-0.036,-0.295,-0.069,-0.100,-0.049
        -2.146,0.014,0.117,54548584975029841690624.000,-54548584975029841690624.000,54574818442859274829824.000,2572610785247232.000,2155874671919104.000,12844309018214137856.000,-0.126

        Something rather stage happened at the end 🙂
        This is reproducable, a second run gave
        RepRapFirmware height map file v1 generated at 0116-10-30 12:26
        xmin,xmax,ymin,ymax,radius,spacing,xnum,ynum
        40.00,180.00,30.00,170.00,-1.00,15.00,10,10
        0.005,0.088,0.093,0.082,0.086,0.084,0.114,0.098,0.087,0.089
        0.014,0.095,0.046,0.086,0.116,0.095,0.001,0.082,0.031,0.042
        0.064,0.105,0.133,0.114,0.112,0.093,0.080,0.031,0.051,0.122
        0.057,0.077,0.094,0.086,0.132,0.116,0.088,0.064,0.035,0.085
        0.140,0.137,0.120,-0.040,0.087,0.086,0.047,0.076,0.055,0.026
        0.198,0.136,0.113,0.024,0.059,-0.053,-0.004,-0.017,0.024,0.022
        0.192,0.133,-0.047,0.039,0.044,-0.099,-0.082,-0.038,-0.037,-0.002
        0.164,0.088,-0.017,0.210,0.014,0.016,-0.004,-0.020,-0.039,-0.014
        0.096,0.117,0.126,0.081,0.060,-0.051,-0.321,-0.093,-0.114,-0.047
        0.047,0.023,0.097,54548584975029841690624.000,-54548584975029841690624.000,54574818442859274829824.000,2572610785247232.000,2155874671919104.000,12844309018214137856.000,-0.146

        Reducing the grid slightly to 9x9 works as expected
        RepRapFirmware height map file v1 generated at 0116-10-30 12:34
        xmin,xmax,ymin,ymax,radius,spacing,xnum,ynum
        40.00,180.00,30.00,170.00,-1.00,16.00,9,9
        0.013,0.065,0.107,0.113,0.109,0.133,0.147,0.118,0.113
        0.077,0.058,0.083,0.092,-0.157,0.064,-0.177,0.131,0.131
        0.122,0.163,0.134,0.129,0.096,0.237,0.030,0.086,0.107
        0.032,0.005,0.052,0.015,0.090,0.085,0.015,0.141,0.071
        0.144,0.070,0.013,-0.023,0.116,-0.003,0.020,0.003,-0.013
        0.123,0.077,0.119,0.086,0.061,0.041,0.044,0.055,-0.003
        0.085,0.115,0.112,0.054,-0.171,-0.390,0.057,0.007,-0.015
        0.106,0.155,0.076,0.085,0.057,0.022,-0.007,-0.053,-0.015
        0.135,0.130,0.071,0.080,0.065,0.032,-0.039,-0.054,-0.043

        Looks like the memory block for the 10x10 grid might be a tad too small and the end is getting overwritten ?

        Chris

        1 Reply Last reply Reply Quote 0
        • dc42undefined
          dc42 administrators
          last edited by

          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.

          Duet WiFi hardware designer and firmware engineer
          Please do not ask me for Duet support via PM or email, use the forum
          http://www.escher3d.com, https://miscsolutions.wordpress.com

          1 Reply Last reply Reply Quote 0
          • chriscainundefined
            chriscain
            last edited by

            Its on a wired duet 0.6

            Date is as it was in the heightmap file, just a cut and paste.

            1 Reply Last reply Reply Quote 0
            • chriscainundefined
              chriscain
              last edited by

              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

              1 Reply Last reply Reply Quote 0
              • eddygaraundefined
                eddygara
                last edited by

                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.

                1 Reply Last reply Reply Quote 0
                • DjDemonDundefined
                  DjDemonD
                  last edited by

                  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.

                  Simon. Precision Piezo Z-Probe Technology
                  www.precisionpiezo.co.uk
                  PT1000 cartridge sensors NOW IN, just attach to your Duet board directly!

                  1 Reply Last reply Reply Quote 0
                  • kraegarundefined
                    kraegar
                    last edited by

                    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?

                    Co-Creator of the RailcoreII CoreXY printer
                    https://www.thingiverse.com/thing:2407174

                    1 Reply Last reply Reply Quote 0
                    • dc42undefined
                      dc42 administrators
                      last edited by

                      Currently it is used throughout the entire print. On my list is to phase it out over a configurable height.

                      Duet WiFi hardware designer and firmware engineer
                      Please do not ask me for Duet support via PM or email, use the forum
                      http://www.escher3d.com, https://miscsolutions.wordpress.com

                      1 Reply Last reply Reply Quote 0
                      • Jackalundefined
                        Jackal
                        last edited by

                        Which movement speed setting should I change for the grid bed compensation probe? Does the M558 F and T parameters contribute to it?

                        1 Reply Last reply Reply Quote 0
                        • dc42undefined
                          dc42 administrators
                          last edited by

                          Yes, they do.

                          Duet WiFi hardware designer and firmware engineer
                          Please do not ask me for Duet support via PM or email, use the forum
                          http://www.escher3d.com, https://miscsolutions.wordpress.com

                          1 Reply Last reply Reply Quote 0
                          • darookeeundefined
                            darookee
                            last edited by

                            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:

                            1 Reply Last reply Reply Quote 0
                            • dc42undefined
                              dc42 administrators
                              last edited by

                              Two Three 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.

                              Duet WiFi hardware designer and firmware engineer
                              Please do not ask me for Duet support via PM or email, use the forum
                              http://www.escher3d.com, https://miscsolutions.wordpress.com

                              1 Reply Last reply Reply Quote 0
                              • Adamfilipundefined
                                Adamfilip
                                last edited by

                                That's correct. I should get time to implement loading the height map from file later this week.

                                Any news? 🙂

                                1 Reply Last reply Reply Quote 0
                                • darookeeundefined
                                  darookee
                                  last edited by

                                  @dc42:

                                  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…

                                  1 Reply Last reply Reply Quote 0
                                  • Rommieundefined
                                    Rommie
                                    last edited by

                                    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 0

                                    could 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, 0

                                    that'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

                                    1 Reply Last reply Reply Quote 0
                                    • Qdeathstarundefined
                                      Qdeathstar
                                      last edited by

                                      Guys, I'm trying to understand the process here.

                                      is it

                                      1. Set z-probe trigger height & Figure out H value to put in the bed.g file for effector tilt
                                      2. run autocalc
                                      3. define the bed via M557 R85 S15
                                      4. run grid leveling via G29
                                      5. put G29 S1 at the end of bed.g to load the height map
                                      6. 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.

                                      1 Reply Last reply Reply Quote 0
                                      • Qdeathstarundefined
                                        Qdeathstar
                                        last edited by

                                        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***

                                        1 Reply Last reply Reply Quote 0
                                        • dc42undefined
                                          dc42 administrators
                                          last edited by

                                          @darookee:

                                          @dc42:

                                          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.

                                          Duet WiFi hardware designer and firmware engineer
                                          Please do not ask me for Duet support via PM or email, use the forum
                                          http://www.escher3d.com, https://miscsolutions.wordpress.com

                                          1 Reply Last reply Reply Quote 0
                                          • dc42undefined
                                            dc42 administrators
                                            last edited by

                                            @Qdeathstar:

                                            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.

                                            Duet WiFi hardware designer and firmware engineer
                                            Please do not ask me for Duet support via PM or email, use the forum
                                            http://www.escher3d.com, https://miscsolutions.wordpress.com

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post
                                            Unless otherwise noted, all forum content is licensed under CC-BY-SA