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.
    • dc42undefined
      dc42 administrators
      last edited by

      You asked for grid bed compensation to be added to RepRapFirmware, and now you can preview it in the latest developer build (1.17dev6). In brief:

      1. Define a grid like this:

      M557 X20:180 Y20:180 S20  ; define a grid covering the XY area indicated with the specified grid spacing
      

      or:

      M557 R100 S20  ; define a grid with the specified radius and spacing (for delta printers)
      

      If you provide both X and Y ranges and a radius, then the intersection will be probed.

      2. Send G29 to probe the bed.

      3. If you want to view detailed results, download file /sys/heightmap.csv. The first 3 lines describe the parameters of the grid. After that come the height measurements, 1 row per scan in the X direction from lowest X to highest X. The rows are ordered from lowest Y to highest Y. A value of 0 with no decimal point means that the point was not probed because it fell outside the defined grid radius or was inaccessible due to probe offset.

      Those of you with programming experience may wish to turn the data into a graphical height map. I am hoping that this can be included in DWC eventually, if HTML5 and Javascript are up to it.

      Please note, I haven't implemented G29 S2 (load height map from file) yet. Also, any sort of G32 probing cancels the height map. So on a delta printer you need to run auto calibration first and G29 second.

      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
      • T3P3Tonyundefined
        T3P3Tony administrators
        last edited by

        As an example I ran a quick probe on my BigBox bed:

        [[language]]
        RepRapFirmware height map file v1 generated at 0116-10-24 07:54
        xmin,xmax,ymin,ymax,radius,spacing,xnum,ynum
        30.00,210.00,30.00,150.00,-1.00,60.00,4,3
        -0.024,0.090,0.206,0.399
        0.065,0.175,0.250,0.327
        -0.049,0.111,0.249,0.405
        
        

        And I thought my bed was flat!

        www.duet3d.com

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

          That works brilliantly. Word of warning if doing this on a delta set a radius carefully to avoid crashing the head into anything near the edges of the bed.

          So does this apply compensation when printing or is it currently just for measuring?

          Pretty flat though (its tooling plate).

          RepRapFirmware height map file v1 generated at 0116-10-23 11:56
          xmin,xmax,ymin,ymax,radius,spacing,xnum,ynum
          -120.00,120.10,-120.00,120.10,150.00,30.00,9,9
          0,0,0.024,0.030,0.001,-0.091,-0.119,0,0
          0,0.062,0.054,0.033,0.040,-0.029,-0.014,-0.087,0
          0.026,0.047,0.056,0.005,0.048,0.031,0.054,0.014,-0.024
          0.045,0.042,0.030,0.024,0.016,-0.021,-0.024,-0.027,0.034
          -0.001,-0.035,-0.000,-0.029,0.018,0.015,-0.004,0.046,-0.001
          0.019,-0.001,0.068,-0.065,0.011,-0.015,-0.006,-0.010,-0.001
          -0.011,-0.042,0.005,-0.041,-0.020,0.020,0.015,0.023,0.020
          0,-0.022,-0.018,-0.005,-0.021,0.025,-0.024,-0.035,0
          0,0,0.032,0.051,0.052,0.041,0.041,0,0

          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
          • dc42undefined
            dc42 administrators
            last edited by

            Yes it does apply compensation when printing in the dev6 build.

            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
            • Dougal1957undefined
              Dougal1957
              last edited by

              David Does it take account of the H Offsets from the Bed.g for a delta? or at least an approximation of them

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

                It works. Even with an autocalibration deviation of 0.2, I wasn't getting an even 1st layer over the whole bed. Now I am.

                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
                • dc42undefined
                  dc42 administrators
                  last edited by

                  The autocalibration takes account of the H offsets in bed.g but the grid bed compensation doesn't.

                  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
                  • Alex9779undefined
                    Alex9779
                    last edited by

                    @dc42 isn't it G29 S1 to load a height map? S2 is described to clear the map…

                    1 Reply Last reply Reply Quote 0
                    • Alex9779undefined
                      Alex9779
                      last edited by

                      Is there a file that is executed before the probing is done and after? Like "bed.g" for the simple bed leveling?
                      I am playing with the BLTouch and I have to deploy it before and undeploy after…

                      1 Reply Last reply Reply Quote 0
                      • Sniffleundefined
                        Sniffle
                        last edited by

                        DC42 how would you like us to report errors when testing the dev branches? I also posted this on github just copy/pasting it here to cover all bases.

                        Not sure how you would like testers to report potential problems from the testing of the Dev firmware. At least this initial time I will post both here and on duet3d forums to find out where you would prefer reports be placed.

                        Machine: C-bot Variant CoreXY
                        Board: Duetwifi 1.0
                        Additions: 7" Paneldue, IRProbe
                        Firmware Version: 1.17 Dev6

                        Description of problem and steps taken to produce:
                        Following Gcodes entered manually.
                        M557 X30:290 Y70:290 S40
                        G28
                        G29

                        Response from system after G29 finishes:
                        Height map saved to file heightmap.csv - 42 points probed, mean error 0.11, deviation 0.24
                        Checksum error on line 203652

                        Additional notes:
                        I did this 2 other times while adjusting the grid boundaries to make it probe the area of the bed i wanted.
                        the following checksum errors also occured
                        Checksum error on line 202354
                        Checksum Error on line 202718

                        1 Reply Last reply Reply Quote 0
                        • Sniffleundefined
                          Sniffle
                          last edited by

                          @Alex9779:

                          Is there a file that is executed before the probing is done and after? Like "bed.g" for the simple bed leveling?
                          I am playing with the BLTouch and I have to deploy it before and undeploy after…

                          I could be wrong, but in the web interface, clicking the "Auto Bed Compensation" button enacts the bed.g file, so you should be able to G28, deploy probe, G29, retract probe, move to wherever you want inside of that file and that should cover you.

                          1 Reply Last reply Reply Quote 0
                          • Alex9779undefined
                            Alex9779
                            last edited by

                            Yeah well I can write macros, actually I have them, and use them…

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

                              Yeah I put the G29 into my bed.g after delta autocalibration.

                              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
                              • Alex9779undefined
                                Alex9779
                                last edited by

                                Oh that's a nice trick, didn't think about that, I can remove all the G30 from bed.g and just replace it with G29 and keep the deploy and undeploy sequence…

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

                                  Sniffle, thanks for your report. Reporting bugs here is best. Were you entering the commands on PanelDue, the web interface, or via a USB host when you got those checksum errors?

                                  Alex, I had forgotten that there are probes that need to be deployed. I could make it call deployprobe.g and retractprobe.g at the start and end of G29 S0. But I am now wondering if there is any point, since the bed compensation runs G32 and you can do the deploy and retract in there.

                                  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
                                  • Dougal1957undefined
                                    Dougal1957
                                    last edited by

                                    David

                                    Is that to say that running a G29 will run the Auto Cal on a delta First before doing the grib Comp.?

                                    I was just going to add G29 at the end of my Start Script in s3d but if I can just replace the G32 with G29 it will be easier

                                    Doug

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

                                      When I tested it yesterday running G29 just does the grid levelling.
                                      If you put G29 into your bed.g after autocal then it will do both when you run the file from start gcode with G32.

                                      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
                                      • Alex9779undefined
                                        Alex9779
                                        last edited by

                                        David: it depends on how you rate the new feature.
                                        IMHO G29 is an improved version of G32. Though G32 is not a real feature, at least in RRF. G32 just executes the bed.g script which is just a execution of multiple G30 commands. So G30 with the plane calculation is the real feature.
                                        So what if we declare G32 is bed compensation and G30 and G29 are just two different methods to compensate.
                                        That way we can use bed.g and it depends on what's in it which compensation is done.

                                        On the other hand if you see G29 a replacement of G32 or an alternative then you should allow probe management for G29 too with special macros.

                                        I vote for what I wrote first… I admit I had problems understanding it myself at first, that's why I wrote all the posts above. But now I thought about it and I think using G32 as a general bed compensation command is WTG...

                                        1 Reply Last reply Reply Quote 0
                                        • T3P3Tonyundefined
                                          T3P3Tony administrators
                                          last edited by

                                          +1 for Alex's approach. Keeping bed.g as theeditable single point for defining what happens makes the most sense.

                                          www.duet3d.com

                                          1 Reply Last reply Reply Quote 0
                                          • Alex9779undefined
                                            Alex9779
                                            last edited by

                                            For this nothing has to be changed, it is just a definition. But the documentation should probably be updated to emphasize this…

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