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

    Auto Bed vs. Mesh Grid Compensation

    Scheduled Pinned Locked Moved
    General Discussion
    6
    17
    3.4k
    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.
    • Phaedruxundefined
      Phaedrux Moderator
      last edited by

      Well there is this
      https://duet3d.dozuki.com/Wiki/Duet_Web_Control_Manual#Section_Probing_the_Bed

      Z-Bot CoreXY Build | Thingiverse Profile

      1 Reply Last reply Reply Quote 0
      • martinchoundefined
        martincho
        last edited by martincho

        Ah, OK, thanks for that. The button isn't labeled correctly then. Even then, the whole thing is really confusing because it runs "bed.g", which has G29 in it.

        Per the documentation on "Auto Bed Compensation" button:

        The "Auto Bed Compensation" button on a Cartesian or "Auto Delta Calibration" button runs G32. 
        This has different functions . On a Cartesian/CoreXY/SCARA machine it is used for 
        Bed levelling using multiple independent Z motors.
        

        Yet, if you look at documentation for G32:

        The firmware executes macro file bed.g if present instead of using the M557 coordinates.
        

        What does "bed.g" contain?

        bed.g
        ; called to perform automatic bed compensation via G32
        ;
        ; generated by RepRapFirmware Configuration Tool v2 on Wed Aug 14 2019 16:30:15 GMT-0700 (Pacific Daylight Time)
        M561 ; clear any bed transform
        G28  ; home all axes
        G29  ; probe the bed and enable compensation
        

        So...G32 really runs G29 but it seems it doesn't enable mesh compensation, for that you would need:

        G29 S1
        

        I don't know, the feeling I am getting is that the documentation isn't correct somewhere, the "Auto Bed Leveling" button isn't labeled correctly and the documentation sends in into a circular trip devoid of clarity. The fact that I was able to fix a bunch of problems by effectively adding just the "S1" portion to the G29 command tells me this might warrant a look by the Duet guys.

        This has caused weeks of consternation on my part. I am sure I'm not the only one who read "Auto Bed Compensation" and thought, well, that's what the button was for. Then, after using it, when the printer has problems, the last thing you think about is bed leveling...because you've already done it, including seeing the nice pop-up graphic showing you the measurements. You look at the documentation and it goes in circles, pretty much confirming that, again, you did the right thing. Until you notice "S1", try it, and all problems go away instantly.

        @dc42 a bit of wisdom on this might help. Thanks.

        1 Reply Last reply Reply Quote 0
        • fcwiltundefined
          fcwilt
          last edited by

          Hi,

          I am using the most recent Duet WiFi firmware.

          For me G29 probes AND enables mesh compensation.

          As to the "Auto Bed Compensation" button: Yes it invokes the bed.g file (if it exists) but the contents of that file is up to you. The contents you have listed will do mesh compensation but it can be created using other commands to do other things - like auto bed leveling using multiple Z-axis steppers.

          Frederick

          Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

          1 Reply Last reply Reply Quote 0
          • tekkydaveundefined
            tekkydave
            last edited by

            This confused me at first until I realised there was a difference between "Bed Levelling" and "Mesh Compensation".
            Bed Levelling (G32) is to do with physically levelling the bed via the motion of the z-axis steppers. For instance on my D-Bot I have 3 z-axis leadscrews controlled by 3 independent motors (see Bed_levelling_using_multiple_independent_Z_motors).

            In my bed.g I have:

            G28				; home
            G30 P0 X10  Y60  Z-99999 	; probe near a leadscrew
            G30 P1 X290 Y60  Z-99999 	; probe near a leadscrew
            G30 P2 X150 Y290 Z-99999 S3 	; probe near a leadscrew and calibrate 3 motors
            
            ; re-home z axis in case it has shifted
            G28 Z
            
            

            When this runs it probes the bed adjacent to each screw and then moves 1 or more z motors to physically level the bed.

            There is no reason to use G32 on a Cartesian or core-xy printer unless you have multiple z-axis motors that can physically adjust the bed levelling.

            Then there is Mesh Compensation (G29). This is to do with ironing out the imperfections in your (already levelled) bed.
            The Z motors will move the bed up & down as the head moves in x & y to simulate a perfectly flat, level bed.

            I run everything from a single macro rather than call G32 from the drop-down in DWC. It levels the bed using G32 then does a G29 probe in a 3x3 grid.

            Calibrate.g

            ; Warm Hotend and Bed
            T0			        ; Select Tool 0
            M104 S130		; Set Tool 0 temperature to 130 - no wait
            M190 S60		; Set Bed temperature to 60 - wait
            
            ; Clear Values
            G29 S2			; Clear Mesh Compensation Values
            M290 R0 S0      	; Clear Baby-stepping
            
            ; Home all Axes
            G28
            
            ; Bed levelling (G32)
            G30 P0 X10  Y50  Z-99999 	; probe near a leadscrew
            G30 P1 X290 Y48  Z-99999 	; probe near a leadscrew
            G30 P2 X148 Y284 Z-99999 S3 	; probe near a leadscrew and calibrate 3 motors
            
            ; Re-home z axis in case it has shifted
            G28 Z
            
            M557 X25:275 Y25:275 S125:125             ; Define mesh grid (3x3)
            
            ; Mesh Compensation (G29)
            G29 S2			; Clear Mesh Compensation Values
            G29			; Run Mesh Compensation
            G1 Z30 F310             ; Move bed down
            G1 X150 Y145 F15600	; Move to centre
            
            

            In my slicer startup gcode I have

            G29 S1                          	; Load Mesh Compensation Settings from file
            

            amongst other things, to reload the Mesh Compensation Height Map created by the G29 in Calibration.g.
            This way I only need to run the calibration once at power-on then simply re-home between prints.

            ~ tekkydave ~
            D-Bot: 300x300mm | Duet WiFi + Duex2 | 3 independent z motors | X,Y & Z linear rails | E3D Titan Aero + V6 | Precision Piezo z-probe
            FreeCAD, PrusaSlicer

            1 Reply Last reply Reply Quote 0
            • martinchoundefined
              martincho
              last edited by

              Thanks for the input.

              I should clarify that my bed.g file is what was created by configtool.reprapfirmware.org. In other words, it's precisely what someone who goes to use a Duet for the first time on a custom build or retrofit is likely to end-up with.

              Now I know better, of course. However, the default bed.g created by this config tool seems to be, if I may be so bold to say, wrong.

              I'll bet if you polled 100 people as to what "Auto Bed Leveling" does or means they are likely to describe mesh leveling. I'll also bet that not one of them would conclude that the button does NOT load and activate the mesh leveling function.

              Anyhow, I figured this out after weeks of hair pulling. I am only posting this for the benefit of others who might be confused by first layer and other problems thinking they are doing everything correctly when, in reality, that button and the configuration file associated with it are part of the problem.

              fcwiltundefined 1 Reply Last reply Reply Quote 0
              • tekkydaveundefined
                tekkydave
                last edited by

                My initial bed.g as downloaded from the configurator contained:

                ; bed.g
                ; called to perform automatic bed compensation via G32
                ;
                ; generated by RepRapFirmware Configuration Tool on Thu Dec 28 2017 14:34:20 GMT+0000 (GMT)
                M561 ; clear any bed transform
                G28  ; home all axes
                ; Probe the bed at 4 points
                G30 P0 X60 Y60 H0 Z-99999
                G30 P1 X60 Y220 H0 Z-99999
                G30 P2 X240 Y220 H0 Z-99999
                G30 P3 X240 Y60 H0 Z-99999 S
                

                At the time I had no idea what it was meant to do.

                ~ tekkydave ~
                D-Bot: 300x300mm | Duet WiFi + Duex2 | 3 independent z motors | X,Y & Z linear rails | E3D Titan Aero + V6 | Precision Piezo z-probe
                FreeCAD, PrusaSlicer

                1 Reply Last reply Reply Quote 0
                • fcwiltundefined
                  fcwilt @martincho
                  last edited by

                  @martincho said in Auto Bed vs. Mesh Grid Compensation:

                  However, the default bed.g created by this config tool seems to be, if I may be so bold to say, wrong.

                  While it may be a bit confusing It's not wrong. The bed.g file is used for different things depending on your printer type and hardware.

                  For a simple Cartesian the created bed.g simply gives you the ability to click the "Auto Bed Compensation" button to do mesh compensation. Mesh compensation is a more advanced approach replacing the older method.

                  The configurator generates different bed.g depending on settings you enter.

                  Select a delta printer and it will generate a bed.g file appropriate for a delta printer. Specify a CoreXY printer and you will get yet a different bed.g file - one that is out of date, I think.

                  I went back and ran the tool again for a Cartesian printer and got that same bed.g - a different one from the first run.

                  I suspect the tool needs some work.

                  I never used the configurator tool. The Duet WiFi comes with example config files. I studied those to get an idea of what my config file needed to contain and I created my own. There is knowledge to be gained doing that way.

                  Glad to hear you finally got it sorted out.

                  Frederick

                  Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

                  1 Reply Last reply Reply Quote 0
                  • martinchoundefined
                    martincho
                    last edited by

                    The default bed.g I got for the cartesian configuration does not enable mesh compensation. It runs everything but the map is never loaded. It's all the theatrics without the final functionality being enabled.

                    This requires G29 S01, which is not included in the default bed.g.

                    That was the root of the problem. G29 vs. G29 S01.

                    BTW, I am not blaming anyone. This is just part of learning. My only input is that someone needs to consider that this might have become quite confusing and convoluted over time.

                    As an aerospace engineer I don't think I am a dummy, and this had me going around in circles for quite some time because things would look like they worked better at times and then they would inexplicably break. Adding "S01" made the difference between an inconsistent printer and one I don't have to worry about any more. Surely I am not the only one who has fallen into this trap.

                    fcwiltundefined 1 Reply Last reply Reply Quote 0
                    • fcwiltundefined
                      fcwilt @martincho
                      last edited by

                      @martincho said in Auto Bed vs. Mesh Grid Compensation:

                      The default bed.g I got for the cartesian configuration does not enable mesh compensation. It runs everything but the map is never loaded. It's all the theatrics without the final functionality being enabled.

                      This requires G29 S01, which is not included in the default bed.g.

                      That was the root of the problem. G29 vs. G29 S01.

                      Then how do you explain that on my printer I don't need G29 S1 (I assume you mean S1) to enable mesh compensation.

                      I can run the mesh bed probing and check if mesh compensation is enable and it is.

                      Are you using the most recent firmware?

                      Frederick

                      Printers: a small Utilmaker style, a small CoreXY and a E3D MS/TC setup. Various hotends. Using Duet 3 hardware running 3.4.6

                      martinchoundefined 1 Reply Last reply Reply Quote 0
                      • martinchoundefined
                        martincho @fcwilt
                        last edited by

                        @fcwilt said in Auto Bed vs. Mesh Grid Compensation:

                        Then how do you explain that on my printer I don't need G29 S1 (I assume you mean S1) to enable mesh compensation.

                        I can run the mesh bed probing and check if mesh compensation is enable and it is.

                        Are you using the most recent firmware?

                        I can't explain it. That's why I asked @dc42 to chip in if possible. I'll check my firmware tomorrow, long day.

                        Thanks.

                        Ex3DPundefined 1 Reply Last reply Reply Quote 1
                        • Ex3DPundefined
                          Ex3DP @martincho
                          last edited by

                          @martincho Hello,

                          Please share your firmware if possible. I am stuck with the same problem. Appreciated in advance.

                          jay_s_ukundefined 1 Reply Last reply Reply Quote 0
                          • jay_s_ukundefined
                            jay_s_uk @Ex3DP
                            last edited by

                            @ex3dp please open a new thread, don't resurrect an old one

                            Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

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