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

    Bed leveling: DWC heightmap shifted in Y

    Scheduled Pinned Locked Moved Solved
    Tuning and tweaking
    3
    5
    251
    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.
    • resamundefined
      resam
      last edited by

      I'm on RRF+SBC 3.5.2 on my Duet2.

      I recently started again using mesh bed leveling.
      I have a CoreXY gantry with the bed moving up and down.
      The extruder on the XY gantry has a normal nozzle with an inductive probe mounted "behind (Y axis)" the nozzle.

      config.g:

      ; Z probe
      M558 P8 C"exp.e5stop" H3 F200:50 T7000 A3 S0.05 ; use E5_STOP as inductive-NPN probe, dual speed, multi-probe
      
      G31 X0 Y-50 Z3.80 P25                 ; Z probe: set the probe XY offset, Z height and signal threshold
      
      ; Axis dimensions
      M208 X0:265 Y0:244 Z0:240                       ; axis maxima
      M671 X-52:306 Y113:113 S10                      ; define positions of Z leadscrews
      M556 S100 X0 Y0 Z0                              ; axis compensation
      
      

      Macro to run the mesh:

      M561                            ; clear any existing bed transform
      G32                             ; home and level
      M557 X15:245 Y-49:137 P9:9      ; set probe coordinates
      G29                             ; detailed Z probe
      

      After running the mesh, DWC shows me this heightmap:
      Screenshot 2024-08-28 at 18.39.38.png
      (please ignore the actual shape and deviation)

      My concern here is the Y shift of the bed relative to the 0,0 coordinate origin. It looks like the coordinate system is incorrect by about the same amount as the nozzle-to-probe offset.

      The probing points are aligned in such a way that the inductive probe is moved to the edges of the bed as far as possible.

      Is this a visual-only bug in DWC, or is the actual compensation matrix incorrectly computed and therefor also affecting the compensation during printing? How do I move my probed bed to Y=0? The actual physical movements and probing points are correct and how I want them to be.

      droftartsundefined Phaedruxundefined 2 Replies Last reply Reply Quote 0
      • droftartsundefined
        droftarts administrators @resam
        last edited by

        @resam said in Bed leveling: DWC heightmap shifted in Y:

        These are you probe offsets:

        G31 X0 Y-50 Z3.80 P25

        Are the X and Y parameters correct? I think not. See https://docs.duet3d.com/en/User_manual/Connecting_hardware/Z_probe_testing#measuring-probe-x-y-offset

        M557 X15:245 Y-49:137 P9:9

        You are asking it to probe at Y-49. This is the coordinates that the axis goes to, relative to the probe, and the coordinates that are returned with the Z height. So it is no surprise that the mesh looks like it starts at Y-49.

        Note: the XY coordinates are permitted to be outside the normal printable bed area! This is intentional, because some printers (e.g. delta printers) benefit from probing areas not used for printing. (See https://docs.duet3d.com/en/User_manual/Reference/Gcodes#description-3)

        Most likely your probe offsets are incorrect, and it's throwing out the coordinates of where you are probing. If you get the offsets correct, adjust the M557 and the mesh will align.

        Ian

        Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

        resamundefined 1 Reply Last reply Reply Quote 0
        • resamundefined
          resam @droftarts
          last edited by resam

          @droftarts thanks for your response. The physical movements are correct, so I don't understand how the probe offsets would be wrong.

          One thing I noticed: M557 ... Y0:137 ... actually starts probing at Y=50. So the M557 coordinates are probe coordinates. My probe is offset from the nozzle in Y by -50, see my G31 command. Thats why in my M557 I want to probe at Y=-49 to move the tool head as far forward as possible.

          The generated heightmap.csv starts like this:

          RepRapFirmware height map file v2 generated at 2024-08-28 18:44, min error -0.217, max error 0.199, mean 0.046, deviation 0.088
          axis0,axis1,min0,max0,min1,max1,radius,spacing0,spacing1,num0,num1
          X,Y,15.00,245.00,-49.00,137.00,-1.00,28.75,23.25,9,9
          ...
          

          Searching through https://github.com/Duet3D/DuetWebControl/blob/v3.5-dev/src/plugins/HeightMap/HeightMap.vue and similar files, I don't see the probe offsets being used anywhere.

          Is the heightmap visualization aware of probe offset?

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

            @resam said in Bed leveling: DWC heightmap shifted in Y:

            probe mounted "behind (Y axis)" the nozzle.

            If it's mounted behind, the probe offset for Y would be positive, would it not?

            Z-Bot CoreXY Build | Thingiverse Profile

            resamundefined 1 Reply Last reply Reply Quote 0
            • resamundefined
              resam @Phaedrux
              last edited by

              Thanks all for questioning my setup! I now managed to get it fixed / changed in the following way:

              # define Z probe
              G31 X0 Y60 Z3.80 P25  # Y was -50 before
              
              # bed leveling with left+right lead screws
              G30 P0 X10 Y130 Z-99999          # Y was 20
              G30 P1 X240 Y130 Z-99999 S2  # Y was 20
              G28 Z 
              
              # mesh leveling
              M557 X20:240 Y55:230 P9:9  # Y was -49:137
              

              So I had to roughly add 3 x probe_offset to most positions compared to my previously (flawed) configs.

              Now the visual heightmap in DWC looks reasonable.

              1 Reply Last reply Reply Quote 1
              • resamundefined resam marked this topic as a question
              • resamundefined resam has marked this topic as solved
              • First post
                Last post
              Unless otherwise noted, all forum content is licensed under CC-BY-SA