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

Monitor what True Bed Levelling is doing?

Scheduled Pinned Locked Moved
Tuning and tweaking
7
25
1.3k
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.
  • undefined
    t0bias
    last edited by 17 Dec 2020, 16:28

    Hi everybody,

    is there any way to monitor what the bed levelling mechanism is doing?

    For testing purposes I set it up with just 4 probing points. Even if it does seem to generate a heightmap correctly, it seems not to have any effect to the printing process whatsoever.

    I tried setting my heated bed deliberately at an uneven angle and the heightmap reflects that slope, however it doesn't seem to apply any correction?

    This is how the Z-probe is configured in my config.g:

    ; Endstops
    M574 X1 S1 P"xstop" ; configure active-high endstop for low end on X via pin xstop
    M574 Y1 S1 P"ystop+exp.e2stop" ; configure active-high endstop for low end on Y via pin ystop / exp.e2stop
    M574 Z1 S1 P"zstop+exp.e3stop" ; configure active-high endstop for low end on Z via pin zstop / exp.e3stop
    ; Z-Probe
    M558 P1 C"zprobe.in+zprobe.mod" H5 F120 T3000 ; set Z probe type to modulated and the dive height + speeds
    G31 P400 X21.6 Y34.15 Z1.83 ; set Z probe trigger value, offset and trigger height
    M557 X45:301 Y35:336 S30 ; define mesh grid
    ; Dual Z-Motor bed levelling
    M671 X34.6:291.1 Y:174.15:174.15 S0.75 ; define the two Z leadscrew test-positions (right: 13/140, left:269.5/140) and max correction of 0.75

    and this is my bed.g:

    ; bed.g
    ; called to perform automatic bed compensation via G32
    ;
    G28 ; home all
    M561 ; clear any bed transform
    ;M401 ; deploy Z probe if necessary
    G30 P0 X42.6 Y34.15 Z-99999 ; probe over rear right bed adjustment screw
    G30 P1 X42.6 Y284.65 Z-99999 ; probe over front right bed adjustment screw
    G30 P2 X282.6 Y284.65 Z-99999 ; probe over front left bed adjustment screw
    G30 P3 X282.6 Y34.15 Z-99999 S4 ; probe over rear left bed adjustment screw and calculate bed compensation
    ;M402 ; retract the Z probe
    G28 ; home all
    1 Reply Last reply Reply Quote 0
    • undefined
      fcwilt
      last edited by 17 Dec 2020, 16:47

      Hi,

      Bed leveling is not the same thing as mesh bed compensation.

      https://duet3d.dozuki.com/Wiki/Using_the_manual_bed_levelling_assistant

      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
      • undefined
        t0bias
        last edited by 17 Dec 2020, 17:07

        I see, thanks Frederick.

        I got confused by the deprecated-message when using the Mesh bed compensation, I guess.

        So the question would then rather be: "Is there a way to monitor mesh bed compensation?"

        1 Reply Last reply Reply Quote 0
        • undefined
          fcwilt
          last edited by 17 Dec 2020, 18:41

          Your config.g file has a M671 command specifying "dual Z-motor bed leveling".

          But your bed.g file does not match. It appears to be configured for manual bed leveling using 4 adjustment screws.

          You need not worry about mesh bed compensation until you get bed leveling (either manual or automatic) sorted out.

          So do you have two Z motors for auto bed leveling?

          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
          • undefined
            Phaedrux Moderator
            last edited by 17 Dec 2020, 19:20

            Please post your full config.g

            There are 4 different techniques available to you and I think you may be confused about what you're using.

            Mesh compensation is used with G29. It creates a heightmap of the bed surface and then adjusts the Z position during a print to compensate. this is what you've asked about, but it's not what you have configured.

            Your bed.g is configured to do a primitive form of mesh compensation that just uses 4 points to create a plane and adjust the z position based on the plane during a print. This is deprecated as you saw, because it is replaced by mesh compensation.

            The M671 command you have in there is used for automatic leveling by moving independent motors up or down to either adjust the tilt of the bed on a corexy, or of the X axis usually on a cartesian printer. It requires multiple motors with independent drivers. You can also use mesh compensation with this auto leveling.

            Then there is a manual bed leveling assistant which measures the corners of the bed and tells you how much to adjust the screws.

            So hopefully that clears things up for you and you can tell us what you actually have and want to do, and we can guide you there.

            Z-Bot CoreXY Build | Thingiverse Profile

            1 Reply Last reply Reply Quote 0
            • undefined
              t0bias
              last edited by 21 Dec 2020, 17:01

              Thanks for clearifying, Frederick and Phaedrux!

              I really think I got confused about the different techniques there.. 🙄

              Ok, so what I am trying do accomplish is to have my printer automatically level the bed as far as possible.

              My printer has two independent Z-motors to lift the bed, one on each side.
              Homing is done using two independent Z-limit-switches (mounted close to the corresponding motor leadscrew), and both switches still allow for about 1mm of moving further up (at least physically), once they trigger.

              In order to get the bed as level as possible, slightly offset to the nozzle a ir-probe is mounted and should be used for the fine-tuning, I guess.

              The complete config.g of mine:

              ; General preferences
              G90 ; send absolute coordinates...
              M83 ; ...but relative extruder moves
              M550 P"My 3D Printer" ; set printer name
              M669 K1 X1:0:0 Y0:1:0 Z0:0:1 ; set CoreXY mode
              ; Network
              M552 S1 ; enable network
              M586 P0 S1 ; enable HTTP
              M586 P1 S0 ; disable FTP
              M586 P2 S0 ; disable Telnet
              ; Drives
              M569 P0 S1 R0 ; physical drive 0 is disabled (R0)
              M569 P1 S1 R0 ; physical drive 1 is disabled (R0)
              M569 P2 S1 R0 ; physical drive 2 is disabled (R0)
              M569 P3 S1 ; physical drive 3 goes forwards (E0)
              M569 P4 S0 ; physical drive 4 goes backwards (E1)
              M569 P5 S1 R1 T5.05:5.05:0.5:0.5 ; physical drive 5 goes forwards (E2 on Expansion Header, X)
              M569 P6 S1 R1 T5.05:5.05:0.5:0.5 ; physical drive 6 goes forwards (E3 on Expansion Header, Y-Left)
              M569 P7 S0 R1 T5.05:5.05:0.5:0.5 ; physical drive 7 goes backwards (E4 on Expansion Header, Y-Right)
              M569 P8 S1 R1 T5.05:5.05:0.5:0.5 ; physical drive 8 goes forwards (E5 on Expansion Header, Z-Left)
              M569 P9 S1 R1 T5.05:5.05:0.5:0.5 ; physical drive 9 goes forwards (E6 on Expansion Header, Z-Right)
              M584 X5 Y6:7 Z8:9 E3:4 ; set drive mapping
              M350 X16 Y16 Z16 E16 I0 ; configure microstepping with interpolation
              M92 X855.00 Y420.00 Z6316.00 E837.00 ; set steps per mm (X = 20T, Y = 60T, Z = M8:1.25)
              M566 X600.00 Y300.00 Z50.00 E820.00 ; set maximum instantaneous speed changes (mm/min)
              M203 X6000.00 Y6000.00 Z1500.00 E1200.00 ; set maximum speeds (mm/min)
              M201 X500.00 Y500.00 Z1000.00 E250.00 ; set accelerations (mm/s^2)
              M906 X800 Y800 Z800 E1000 I30 ; set motor currents (mA) and motor idle factor in per cent
              M84 S30 ; Set idle timeout
              ; Axis Limits
              M208 X0 Y0 Z0 S1 ; set axis minima
              M208 X284 Y333 Z370 S0 ; set axis maxima
              ; Endstops
              M574 X1 S1 P"xstop" ; configure active-high endstop for low end on X via pin xstop
              M574 Y1 S1 P"ystop+exp.e2stop" ; configure active-high endstop for low end on Y via pin ystop / exp.e2stop
              M574 Z1 S1 P"zstop+exp.e3stop" ; configure active-high endstop for low end on Z via pin zstop / exp.e3stop
              ; Opposite Side Limit Switches
              M950 J1 C"^exp.e4stop" ; create input J1 on pin exp.e4stop
              M581 P1 S0 T3 C0 ; configure active-high X/Y/Z-Axis Upper Limit switch (S0 = falling edge)
              ; Magnetic Filament Monitor
              M591 D0 P4 C"exp.e5stop" S1 A0 ; configure Filament monitoring for E0 on pin exp.e5stop
              M591 D1 P4 C"exp.e6stop" S1 A0 ; configure Filament monitoring for E1 on pin exp.e6stop
              ; Z-Probe
              M558 P1 C"zprobe.in+zprobe.mod" H5 F120 T3000 ; set Z probe type to modulated and the dive height + speeds
              G31 P400 X21.6 Y34.15 Z1.83 ; set Z probe trigger value, offset and trigger height
              M557 X45:301 Y35:336 S30 ; define mesh grid
              ; Dual Z-Motor bed levelling
              M671 X34.6:291.1 Y:174.15:174.15 S0.75 ; define the two Z leadscrew test-positions (right: 13/140, left:269.5/140) and max correction of 0.75
              ; Heaters
              M308 S0 P"bedtemp" Y"thermistor" A"Heated-Bed" T100000 B4138 ; configure sensor 0 as thermistor on pin bedtemp
              M950 H0 C"bedheat" T0 ; create bed heater output on bedheat and map it to sensor 0
              M307 H0 B0 S1.00 ; disable bang-bang mode for the bed heater and set PWM limit
              M140 H0 ; map heated bed to heater 0
              M143 H0 S145 ; set temperature limit for heater 0 to 145C
              M308 S1 P"e0temp" Y"pt1000" A"E0-Temperature" ; configure sensor 1 as PT1000 on pin e0temp
              M950 H1 C"e0heat" T1 ; create nozzle heater output on e0heat and map it to sensor 1
              M307 H1 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit
              M143 H1 S360 ; set temperature limit for heater 1 to 360C
              M308 S2 P"e1temp" Y"pt1000" A"E1-Temperature" ; configure sensor 2 as PT1000 on pin e1temp
              M950 H2 C"e1heat" T2 ; create nozzle heater output on e1heat and map it to sensor 2
              M307 H2 B0 S1.00 ; disable bang-bang mode for heater and set PWM limit
              M143 H2 S360 ; set temperature limit for heater 2 to 360C
              ; Additional Temperature Sensors
              M308 S3 P"exp.thermistor3" Y"thermistor" A"X-Motor" T100000 B4138 ; configure sensor 3 as thermistor on pin exp.thermistor3
              M308 S4 P"exp.thermistor4" Y"thermistor" A"Y-Motor (Right)" T100000 B4138 ; configure sensor 4 as thermistor on pin exp.thermistor4
              M308 S5 P"exp.thermistor5" Y"thermistor" A"Y-Motor (Left)" T100000 B4138 ; configure sensor 5 as thermistor on pin exp.thermistor5
              M308 S6 P"exp.thermistor6" Y"thermistor" A"Z-Motor (Right)" T100000 B4138 ; configure sensor 6 as thermistor on pin exp.thermistor6
              M308 S7 P"exp.thermistor7" Y"thermistor" A"Z-Motor (Left)" T100000 B4138 ; configure sensor 7 as thermistor on pin exp.thermistor7
              ; Fans
              M950 F0 C"fan0" Q500 ; create fan 0 on pin fan0 and set its frequency
              M106 P0 S1 H-1 ; set fan 0 value. Thermostatic control is turned off
              M950 F1 C"fan1" Q500 ; create fan 1 on pin fan1 and set its frequency
              M106 P1 S1 H-1 ; set fan 1 value. Thermostatic control is turned off
              ; Tools
              M563 P0 S"Main Extruder" D0 H1 F0 ; define tool 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"Support Extruder" D1 H2 F1 ; define tool 1
              G10 P1 X0 Y0 Z0 ; set tool 1 axis offsets
              G10 P1 R0 S0 ; set initial tool 1 active and standby temperatures to 0C
              M200 D1.75 ; set filament diameter for all extruders to 1.75mm
              ; Miscellaneous
              M575 P1 S1 B57600 ; enable support for PanelDue
              T0 ; select first tool
              ; Heater settings
              M307 H0 A143.3 C694.4 D1.3 B0 ; PID settings for bed heate
              M307 H1 A390.2 C250.5 D11.7 B0 ; settings for heater 1
              M307 H2 A663.8 C218.7 D4.7 B0 ; settings for heater 2
              1 Reply Last reply Reply Quote 0
              • undefined
                Phaedrux Moderator
                last edited by 21 Dec 2020, 17:46

                So in your case you can use the limit switches to get homed to a known location and reasonably level. Then you can use the probe and the independently driven lead screws to do another leveling pass.

                G28 to home using the switches
                G32 to use bed.g for the auto leveling pass

                In bed.g you would need to follow the example here for 2 motors

                https://duet3d.dozuki.com/Wiki/Bed_levelling_using_multiple_independent_Z_motors#Section_Example_for_2_motors

                Basically you would need the M584 and M671 in your config.g to define the drivers and the locations of the lead screws. And then in bed.g itself you'd need to use a single G30 at the center of the bed to define Z0, then probe two locations closest to the lead screws to adjust the tilt, and then another G30 at the center to reset Z0.

                Z-Bot CoreXY Build | Thingiverse Profile

                1 Reply Last reply Reply Quote 0
                • undefined
                  t0bias
                  last edited by 25 Dec 2020, 16:30

                  Seasons greetings, everyone!

                  Ok, so my bed.g now looks like this:

                  G28 ; home all
                  G1 Z5.25 ; lower bed a bit
                  G1 X162.85 Y174.15 ; move to center point
                  G30 S-2 ; adjust Z
                  G30 P0 X34.6 Y174.15 Z-99999 ; probe near right Z motor leadscrew
                  G30 P1 X291.1 Y174.15 Z-99999 S2 ; probe near left Z motor leadscrew
                  G1 X162.85 Y174.15 Z5.25 ; move to center point (again)
                  G30 S-2 ; re-adjust Z
                  G28 XY ; home X and Y

                  However, now I always get the error

                  G32
                  Error: Probe points P0 to P1 must be in clockwise order starting near minimum X and Y
                  1 Reply Last reply Reply Quote 0
                  • Vetiundefined
                    Veti
                    last edited by 25 Dec 2020, 16:31

                    swap the points

                    1 Reply Last reply Reply Quote 0
                    • undefined
                      t0bias
                      last edited by 26 Dec 2020, 16:41

                      I already tried that without success unfortunately!

                      undefined undefined 2 Replies Last reply 26 Dec 2020, 16:58 Reply Quote 0
                      • undefined
                        engikeneer @t0bias
                        last edited by 26 Dec 2020, 16:58

                        @t0bias maybe try modifying the y coordinates of your probe points in the bed.g file slightly (like +/- 0.01mm) so that from the first G30 (S-2) to the P1 G30 it goes in a clockwise (though very flat!) pattern?

                        Failing that, maybe put a G1 move between the first G30 and the P0 G30?

                        E3D TC with D3Mini and Toolboards.
                        Home-built CoreXY, Duet Wifi, Chimera direct drive, 2x BMG, 300x300x300 build volume
                        i3 clone with a bunch of mods

                        1 Reply Last reply Reply Quote 0
                        • undefined
                          fcwilt @t0bias
                          last edited by fcwilt 26 Dec 2020, 17:26

                          @t0bias said in Monitor what True Bed Levelling is doing?:

                          I already tried that without success unfortunately!

                          I don't understand the values in your M671 command in config.g.

                          How can the lead screws be inside the bed min/max limits?

                          Thanks.

                          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 1
                          • undefined
                            t0bias
                            last edited by 26 Dec 2020, 23:12

                            @fcwilt good point! I used the probing-point coordinates for the leadscrews as well by mistake..

                            1 Reply Last reply Reply Quote 0
                            • undefined
                              t0bias
                              last edited by 30 Dec 2020, 12:43

                              I adjusted that very line in my config.g to this:

                              M671 X-49:333 Y140:140 S0.75	; define the two Z leadscrew positions (right: -49/140, left:333/140) and max correction of 0.75
                              

                              But now even weirder I get the following error:

                              G32
                              Error: Some computed corrections exceed configured limit of 0.75mm: -2.095 -0.356

                              And even I don't exactly know the height-difference; I can absolutely guarantee there is by no means a difference of two millimeters? And why are there two values anyway?
                              😮

                              Vetiundefined 1 Reply Last reply 30 Dec 2020, 12:55 Reply Quote 0
                              • Vetiundefined
                                Veti @t0bias
                                last edited by 30 Dec 2020, 12:55

                                @t0bias said in Monitor what True Bed Levelling is doing?:

                                Error: Some computed corrections exceed configured limit of 0.75mm: -2.095 -0.356

                                you set a limit in M671. That limit has been exceeded

                                1 Reply Last reply Reply Quote 0
                                • undefined
                                  t0bias
                                  last edited by 30 Dec 2020, 14:20

                                  @Veti thanks.

                                  I do understand the meaning of the error; but that's what I am saying - there is no way, there is over 2mm of height difference. And before I changed the probing positions, that error never showed up..

                                  undefined 1 Reply Last reply 30 Dec 2020, 15:45 Reply Quote 0
                                  • Vetiundefined
                                    Veti
                                    last edited by 30 Dec 2020, 14:45

                                    post a picture of a g29 that should show the tilt

                                    1 Reply Last reply Reply Quote 0
                                    • undefined
                                      engikeneer @t0bias
                                      last edited by engikeneer 30 Dec 2020, 15:45

                                      @t0bias the values reported are the corrections at the motors/leadscrews so will be a bit bigger than what you are seeing at the bed.

                                      The reason you have two values is that it will correct both motors. Most likely your bed has some curve so the edges are lower then the middle (hence both are negative). This is the reason you should re-home z after doing auto bed levelling.

                                      If you really think the amount of correction is too high, then the first question is on the probe readings. How consistent are they (if you repeatedly prove the same point) and are there any variations across the bed? Seeing a G29 heightmap might give us some clues.

                                      E3D TC with D3Mini and Toolboards.
                                      Home-built CoreXY, Duet Wifi, Chimera direct drive, 2x BMG, 300x300x300 build volume
                                      i3 clone with a bunch of mods

                                      1 Reply Last reply Reply Quote 0
                                      • gloomyandyundefined
                                        gloomyandy
                                        last edited by gloomyandy 30 Dec 2020, 15:46

                                        @t0bias A couple of thoughts. Firstly the -2.095/-0.356 is the correction being made at each of the stepper motors. Remember that these are outside of your bed and so the correction needed will be larger than the actual error at the edge of the bed. Secondly the correction being made to both steppers is negative (so in effect the tilt part of the correction will only be -1,739) this probably means that your bed is at a slightly different height in the centre (where you are setting z=0) than at the points you are probing so there will be a movement in both motors to try and correct for that.

                                        One other thing, your are using G30 s-2 to set your z=0 point, I'm not sure that is correct are you sure that this should not just be G30 (with no s parameter)? That is the usual way of setting the z=0 point based on the probe offset.

                                        Edit I see that @engikeneer got there before me!

                                        1 Reply Last reply Reply Quote 1
                                        • undefined
                                          3dML
                                          last edited by 3dML 1 Feb 2021, 18:14 30 Dec 2020, 21:46

                                          @t0bias
                                          Use a

                                          G1 Xnnn Ynnn
                                          G30

                                          where X and Y is the tool position of the first probe point not the probe position as G30 does not use the G31 probe offset and G30 Pnnn does.

                                          This will set the first probe point height to 0 to minimize the lead screw compensation.

                                          After lead screw compensation rehome at the normal location to set Z offset.

                                          Edit: Also add a G29 S2at the beginning of the file to clear Height Map before bed leveling. Reenable Height Map with a G29 S1 at the end of the file.

                                          Update: Corrected the first G30 as stated in a later post.

                                          undefined 1 Reply Last reply 1 Jan 2021, 21:56 Reply Quote 0
                                          4 out of 25
                                          • First post
                                            4/25
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA