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

    Verifying mesh levelling

    Scheduled Pinned Locked Moved
    General Discussion
    6
    71
    4.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.
    • Phaedruxundefined
      Phaedrux Moderator @BStump
      last edited by

      @bstump said in Verifying mesh levelling:

      Please explain more.

      Please read about how the taper works.

      https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_M376_Set_bed_compensation_taper

      It reduces the amount of compensation applied over the range of distance given, so that by 10mm above Z0, there is no more compensation applied. At 5mm above Z0, only 50% of the compensation is applied.

      Z-Bot CoreXY Build | Thingiverse Profile

      1 Reply Last reply Reply Quote 1
      • BStumpundefined
        BStump @Phaedrux
        last edited by

        @phaedrux said in Verifying mesh levelling:

        @marp said in Verifying mesh levelling:

        the tilt macro calls bedscrews.g which just checks the four corners with G30 and adjusts it.

        How many points are you using in your mesh? For such a large bed you should be using as many as possible which is up to 441.

        How many times are you doing the tilt correction?

        We typically do a 400 point mesh.

        The bed tilt calibrations runs up to 6 times to dial in.

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

          @bstump said in Verifying mesh levelling:

          Frederick

          Can you share your bed.g and mesh.g

          Both of my files are more complicated then they need to be to perform their basic functions - I have included features primarily of use when getting the printer initially dialed in.

          Here is my bed.g - it references a number of .G files to perform needed actions - the names indicate what is done.

          M98 P"homeALL_verify.g"
          
          M98 P"probe_config.g"
          
          ; --- prepare to level bed ---
          
          ; M671: Define positions pf manual bed levelling screws or Z leadscrews
          
          ; Xnn:nn:nn... list of between 2 and 4 X coordinates of the leadscrews that drive the Z axis or the bed levelling screws
          ; Ynn:nn:nn... list of between 2 and 4 Y coordinates of the leadscrews that drive the Z axis or the bed levelling screws
          ; Snn          maximum correction allowed for each leadscrew in mm (optional, default 1.0)
          ; Pnnn         pitch of the bed levelling screws (not used when bed levelling using independently-driven leadscrews). Defaults to 0.5mm which is correct for M3 bed levelling screws
          ; Fnn          fudge factor, default 1.0
          
          M671 X-180:0:180 Y-65:130:-65 S3 ; positions of ball studs
          
          M291 R"Leveling bed" P"Please wait..." T0
          
          ; --- level bed leveling ---
          
          while true
            ; run leveling pass
          
            ; determine where to probe
          
          if {global.g_level_mode} != "4PT"
            ; --- 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
            
          else
            ; --- probe near bed corners ---
          
            G30 P0 X-140 Y-90 Z-99999    ; LF
            G30 P1 X-140 Y90  Z-99999    ; LR
            G30 P2 X140  Y90  Z-99999    ; RR
            G30 P2 X140  Y-90 Z-99999 S3 ; RF 
          
            ; 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
          
          M291 R"Bed leveling complete" P"OK" T0
          

          Here is my mesh.g:

          if {global.g_map_mode} = "NONE"
            M291 R"Cannot create height map - Map Mode is set to NONE" P"Cannot continue" S2 T0
            abort "Map Mode is set to NONE"
          
          M98 P"homeALL_query.g"
          
          M98 P"probe_set_z.g"              ; set Z=0 datum
          
          G32                               ; level bed to be safe
          
          M208 Y-115:100                    ; adjust axis min/max to allow for probe offset
          
          
          if {global.g_map_mode} = "FAST4"
            M291 R"Creating FAST4 Height Map" P"Please wait..." T0
          
            M557 X-140:140 Y-90:90 P2:2     ; define 4 point mesh for G29
          
            G29 S0                          ; do probing
            G29 S3 P"heightmap_FAST4.csv"   ; save file with unique name
          
            M291 R"FAST4 Height Map Created" P"OK" T1
          elif {global.g_map_mode} = "FAST9"
            M291 R"Creating FAST9 Height Map" P"Please wait..." T0
          
            M557 X-140:140 Y-90:90 P3:3     ; define 9 point mesh for G29
          
            G29 S0                          ; do probing
            G29 S3 P"heightmap_FAST9.csv"   ; save file with unique name
          
            M291 R"FAST9 Height Map Created" P"OK" T1
          else
            M291 R"Creating FULL Height Map" P"Please wait..." T0
          
            M557 X-140:140 Y-90:90 P20      ; define FULL mesh for G29 (400 points)
            
            G29 S0                          ; do probing
            G29 S3 P"heightmap_FULL.csv"    ; save file with unique name
          
            M291 R"FULL Height Map Created" P"OK" T1
          
          M208 Y-100:100                    ; restore axis min/max to normal
          
          G29 S2                            ; cancel mesh bed compensation
          M290 R0 S0                        ; cancel baby stepping
          

          Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

          BStumpundefined 1 Reply Last reply Reply Quote 0
          • BStumpundefined
            BStump @fcwilt
            last edited by

            @fcwilt I am wondering if the offset between the probe and the nozzle is correctly compensated for in the bed tilt and mesh compensation. with our duel head extruder the probe sits half way between the tow nozzles in the direction for one axis and the aligned for the other axis . I think the nozzle to probe distance is in the range of 50-75mm. In looking at two side by side probe points in the mesh the probing distance is around 5mm and the difference in mesh height can be 0.1 to 0.16mm. I am thinking our bed adhesion issue may be related to the probe to nozzle distance not being fully adjusted for and the mesh compensation being for a real surface point around 5 mm from where the nozzle is. Depending on where on the bed the nozzle is the adjusted mesh may be up or down from what the mesh says because the mesh is effectively pushed back/front by around 50 mm.

            fcwiltundefined 1 Reply Last reply Reply Quote 0
            • BStumpundefined
              BStump
              last edited by

              If I read the following correctly we say the two nozzles are 52.5mm apart and the probe is X-14 Y21 from the first nozzle. I am having this verified.

              ; Z-Probe
              M950 S0 C"duex.e6heat"                                  ; create servo pin 0 for BLTouch
              M558 P9 C"^zprobe.in" H5 F120 T9000 R0.7                ; set Z probe type to bltouch and the dive height + speeds
              ; heater 7 output used for PWM of BL touch (e6 heat)
              G31 P500 X-14 Y21 Z1.000                    		    ; Set Z probe trigger value, offset and trigger height(Z-offset)
              M557 X-14:974 Y21:1009 S52 		                        ; Define mesh grid. 400 Points
              ;M376 H10			                    				; Height (mm) over which to taper off the bed compensation
              M376 H0			                    					; compensation taper disabled TEST
              
              ; Tools
              M563 P0 S"E0 Primary" D0 H1 F0                          ; define tool 0, E0 drive, heater 1, fan 0
              G10 P0 X0 Y0 Z0                                         ; set tool 0 axis offsets
              G10 P0 R0 S0                                            ; set initial tool 0 active and standby temperatures to 0C
              M563 P1 S"E1 SEcondary" D1 H2 F1                        ; define tool 1
              G10 P1 X-0.2 Y52.5 Z0                                   ; set tool 1 axis offsets
              G10 P1 R0 S0                                            ; set initial tool 1 active and standby temperatures to 0C
              
              BStumpundefined 1 Reply Last reply Reply Quote 0
              • BStumpundefined
                BStump @BStump
                last edited by

                I think the method to do the offsets is correct, but how can we tell if the mesh compensation take these offsets into account correctly? We are still verifying the numbers.

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

                  @bstump said in Verifying mesh levelling:

                  @fcwilt I am wondering if the offset between the probe and the nozzle is correctly compensated for in the bed tilt and mesh compensation

                  I don't actually understand what you are asking.

                  Frederick

                  Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

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

                    @bstump

                    I've never worked with a multi-tool printer.

                    And I don't find the documentation of G31 very clear in regards to multi-tool printers.

                    In the absence of any additional information I would set the offsets of the probe to X=0 Y=0 and offsets of each tool relative to the probe.

                    Testing would reveal if that actually worked.

                    Frederick

                    Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

                    Phaedruxundefined 1 Reply Last reply Reply Quote 0
                    • Phaedruxundefined
                      Phaedrux Moderator @fcwilt
                      last edited by

                      @fcwilt said in Verifying mesh levelling:

                      In the absence of any additional information I would set the offsets of the probe to X=0 Y=0 and offsets of each tool relative to the probe.

                      You could do that for testing, but I think the default method is to have tool0 be at x0 y0, and the probe for tool 0 offset from that. Tool1 would then have it's offset defined in relation to tool0.

                      Z-Bot CoreXY Build | Thingiverse Profile

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

                        @phaedrux said in Verifying mesh levelling:

                        @fcwilt said in Verifying mesh levelling:

                        In the absence of any additional information I would set the offsets of the probe to X=0 Y=0 and offsets of each tool relative to the probe.

                        You could do that for testing, but I think the default method is to have tool0 be at x0 y0, and the probe for tool 0 offset from that. Tool1 would then have it's offset defined in relation to tool0.

                        That makes sense but I could not find where that is stated.

                        There is this in the Gode Dictionary for G31:

                        1X and Y offsets of the Z probe relative to the print head (i.e. the position when the empty tool is selected) can be specified. This allows you to calculate your probe coordinates based on the geometry of the bed, without having to correct them for Z probe X and Y offset.

                        but I don't know what it is trying to say.

                        Frederick

                        Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

                        Phaedruxundefined 1 Reply Last reply Reply Quote 0
                        • BStumpundefined
                          BStump @fcwilt
                          last edited by

                          @fcwilt said in Verifying mesh levelling:

                          I don't actually understand what you are asking.

                          There is an offset between the probe and the nozzle. Assuming our offsets are correct, how can we verify that the mesh compensation take this offset correctly into account when applying the mesh compensation? Basically the probe mesh is offset in two directions to the primary nozzle.

                          If it takes the offset correctly into account then I would expect the nozzle to follow the mesh contour almost perfectly (given whatever extrapolation method it uses). However if it does not take the offset into account correctly or at all then the applied mesh would be offset from the nozzle and the nozzle would follow an offset contour.

                          We have a test spiral that covers the bed twice and he pair of lines is 25mm away from the other pair of lines. We see some spots that are nice and some a bit tight and squished, and others that do not adhere and were not proper layer thickness. This leans me to think the whole mesh is offset.

                          If we compare side by side points (given the large bed that is not easy to level manually) we see between 0.1 and 0.16mm difference in mesh pint heights. If this translates to the nozzle contour that would be great, but It does not. The first pair of points is beside a seam in the plates (three bead plates with 3 separate pieces of PEI. The second pair of points is along one plate.

                          7aa37eeb-c3ab-4303-b2c9-92ff1836bf87-image.png

                          As I said, I am questioning if the probe to nozzle offsets are correctly applied when the bed mesh is applied and questioning how to check that.

                          fcwiltundefined Phaedruxundefined 2 Replies Last reply Reply Quote 0
                          • fcwiltundefined
                            fcwilt @BStump
                            last edited by

                            @bstump

                            I've always assumed they are but it's easy to check.

                            Here is the text of a height map for testing:

                            RepRapFirmware height map file v2 generated at 2021-01-01 00:00, min error 0.000, max error 0.00, mean 0.000, deviation 0.000
                            xmin,xmax,ymin,ymax,radius,xspacing,yspacing,xnum,ynum
                            0.00,150.00,0.00,150.00,-1.00,15.00,150.00,11,2
                            0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
                            0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10

                            It greatly exaggerates Z errors so you can jog along the X axis and verify the Z adjustments.

                            test height map.jpg

                            Adjust these values as needed to match your printer:

                            xmin, xmax, ymin, ymax, radius, xspacing, yspacing, xnum, ynum

                            Create a file heightmap.csv in your system folder with the data above adjusted for your printer.

                            Enable mesh compensation using this file.

                            Frederick

                            Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

                            1 Reply Last reply Reply Quote 0
                            • Phaedruxundefined
                              Phaedrux Moderator @fcwilt
                              last edited by

                              @fcwilt said in Verifying mesh levelling:

                              That makes sense but I could not find where that is stated.

                              I think it's just convention, since you can set whatever you want as the origin and offset anything from anywhere if you want. It really depends on the setup what makes the most sense.

                              @fcwilt said in Verifying mesh levelling:

                              1X and Y offsets of the Z probe relative to the print head (i.e. the position when the empty tool is selected) can be specified. This allows you to calculate your probe coordinates based on the geometry of the bed, without having to correct them for Z probe X and Y offset.
                              but I don't know what it is trying to say.

                              I think it might be talking about tool changer situations where you may have a probe attached to the head itself rather than a tool. I think the E3D tool changer is an example of that. There is a switch on the carriage itself that is used to probe. The tools are all offset from that.

                              Z-Bot CoreXY Build | Thingiverse Profile

                              1 Reply Last reply Reply Quote 0
                              • Phaedruxundefined
                                Phaedrux Moderator @BStump
                                last edited by

                                @bstump said in Verifying mesh levelling:

                                If it takes the offset correctly into account then I would expect the nozzle to follow the mesh contour almost perfectly

                                Yes of course it takes the offset into account. It will adjust for your nozzle not the probe itself. That's why you tell it how far your probe is from the nozzle tip in XYZ.

                                Z-Bot CoreXY Build | Thingiverse Profile

                                BStumpundefined 1 Reply Last reply Reply Quote 0
                                • BStumpundefined
                                  BStump @Phaedrux
                                  last edited by

                                  @phaedrux said in Verifying mesh levelling:

                                  @bstump said in Verifying mesh levelling:

                                  If it takes the offset correctly into account then I would expect the nozzle to follow the mesh contour almost perfectly

                                  Yes of course it takes the offset into account. It will adjust for your nozzle not the probe itself. That's why you tell it how far your probe is from the nozzle tip in XYZ.

                                  If it does properly take it into account then we have bigger issues. If it does not take it into account then That would tend to look somewhat like the issues we are seeing.

                                  We did find turning off taper did improve the first layer but not as much as hoped.

                                  BStumpundefined 1 Reply Last reply Reply Quote 0
                                  • BStumpundefined
                                    BStump @BStump
                                    last edited by

                                    I thought of a way to prove the nozzle to probe offset is being taken into account correctly.

                                    • For the first point in the bed tilt probing, mark the bed with a sharpie at the expected probe spot +/-5mm. Likely all 4 corners.

                                    • Run the tilt macro and see if the probe comes down on the marked spots.

                                    • Now via the console, send the nozzle to those coordinates and also see if they match up.

                                    • I suppose I could generate a quick code to print a few loops of a circle at each spot. The sharpie dots should be centered on each circle.

                                    If they all match up then we have some other issues, and we need to figure iut what the issue(s) is(are)

                                    If they do not match up then the probe offset is not being compensated for correctly, and we need to figure out why.

                                    This would not prove the mesh compensation compensates correctly for the probe to nozzle offset, but it is a first step in trusting that it does.

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

                                      @bstump

                                      If your X and Y probe offset settings are correct then the positions will match.

                                      Frederick

                                      Printers: a E3D MS/TC setup and a RatRig Hybrid. Using Duet 3 hardware running 3.4.6

                                      1 Reply Last reply Reply Quote 0
                                      • BStumpundefined
                                        BStump
                                        last edited by

                                        We did my little check and found that the probe offset is compensated for. We also did do some test prints where we turned off Taper and adhesion improved notably. So the questions now are

                                        • Why does the taper adjustment degrade adhesion?
                                        • What is happening in the algorithm that does the taper adjustment that it is not applying a consistent first layer thickness?
                                          ** Over 10mm taper ajdustment zone, the per layer adjustment should be ~2% of the needed mesh compensation.
                                          ** A pretty small number that should not impact bed adhesion.

                                        Could it be at a mesh point ever 50mm is not enough to properly mesh the bed? Should we try a 900 point mesh vs the 400 point mesh we typically do?

                                        jay_s_ukundefined Phaedruxundefined 2 Replies Last reply Reply Quote 0
                                        • jay_s_ukundefined
                                          jay_s_uk @BStump
                                          last edited by

                                          @bstump the most mesh points you can have are 441

                                          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

                                          BStumpundefined 1 Reply Last reply Reply Quote 0
                                          • Phaedruxundefined
                                            Phaedrux Moderator @BStump
                                            last edited by

                                            @bstump said in Verifying mesh levelling:

                                            Could it be at a mesh point ever 50mm is not enough to properly mesh the bed?

                                            this is why I suggested doing a mesh of a smaller area of your printer where you will print a part and see if there is improvement.

                                            @bstump said in Verifying mesh levelling:

                                            Why does the taper adjustment degrade adhesion?

                                            It's adsjusting the position less each layer than the measured amount over the distance set for the taper. If you use 10mm, at 5mm height it will have 50% less compensation effect such that by 10mm there is no compensation at all. If you set the taper too low, it will be reducing the compensation too much for what you need.

                                            Z-Bot CoreXY Build | Thingiverse Profile

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