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

G32 doesnt save after True Bed Leveling

Scheduled Pinned Locked Moved
General Discussion
6
63
2.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.
  • undefined
    johny
    last edited by johny 28 Nov 2023, 23:33

    Board+Firm:
    Board: Duet 2 WiFi (2WiFi)
    Firmware: RepRapFirmware for Duet 2 WiFi/Ethernet 3.4.6 (2023-07-21)
    Duet WiFi Server Version: 1.21RC2

    After run G32 (bed.g) the software detects a difference between the 2 Z motors and adjust but it doesn't save the position; After finishing one side returns to the same place and if i run G32 again it detects the same difference, calibrate again and remove the calibration.

    af7004cb-f8d5-41a4-880e-c0c8670cc3dc-image.png

    Bed.g

    ;M561 ; clear any bed transform
    G91 ; Set to relative position
    G1 Z5 H2 F2000 ; Making sure we're not going to hit the side of glass
    G90 ; Set to absolute position
    G28 ; home all axis
    G30 P0 X35 Y220 Z-99999
    G30 P1 X310 Y220 Z-99999 S2
    G30 P0 X35 Y220 Z-99999
    G30 P1 X310 Y220 Z-99999 S2
    G30 P0 X35 Y220 Z-99999
    G30 P1 X310 Y220 Z-99999 S2
    G28 Z0 ; Rehome the printer
    ;G29 S1 ; probe the bed and enable compensation

    homez.g

    G91 ; relative positioning
    G1 H2 Z5 F6000 ; lift Z relative to current position
    G90 ; absolute positioning
    G1 X175 Y175 F4000 ; go to first bed probe point and home Z
    G30
    ;G29 S1

    config.g

    ; Configuration file for Duet WiFi (firmware version 3.3)
    ; executed by the firmware on start-up
    ;
    ; generated by RepRapFirmware Configuration Tool v3.3.16 on Mon Sep 04 2023 16:53:25 GMT+0000 (Hora Coordenada Universal)
    ; General preferences
    G90 ; send absolute coordinates...
    M83 ; ...but relative extruder moves
    M550 P"My Printer" ; set printer name
    M669 K1
    ; Network
    M551 P"1234" ; set password
    M552 S1 ; enable network
    M586 P0 S1 ; enable HTTP
    M586 P1 S0 ; disable FTP
    M586 P2 S0 ; disable Telnet
    ; Drives
    M569 P0 S0 ; physical drive 0 goes forwards
    M569 P1 S1 ; physical drive 1 goes forwards
    M569 P2 S0 ; physical drive 2 goes forwards
    M569 P3 S0
    M569 P4 S0 ; physical drive 3 goes forwards
    M584 X0 Y1 Z4:2 E3 ; set drive mapping
    M350 X16 Y16 Z16 E16 I1 ; configure microstepping with interpolation
    M92 X200.00 Y200.00 Z389.00 E710.00 ; set steps per mm
    M566 X600.00 Y600.00 Z24.00 E300.00 ; set maximum instantaneous speed changes (mm/min)
    M203 X12000.00 Y12000.00 Z600.00 E2500.00 ; set maximum speeds (mm/min)
    M201 X3000.00 Y3000.00 Z100.00 E3000.00 ; set accelerations (mm/s^2)
    M906 X1600 Y1600 Z1600 E1600 I30 ; set motor currents (mA) and motor idle factor in per cent
    M84 S30 ; Set idle timeout
    ; Axis Limits
    M208 X-10 Y0 Z0 S1 ; set axis minima
    M208 X345 Y340 Z350 S0 ; set axis maxima
    ; Endstops
    M574 X1 S1 P"xstop"; configure switch-type (e.g. microswitch) endstop for low end on X via pin xstop ; configure switch-type (e.g. microswitch) endstop for low end on Y via pin ystop
    M574 Y1 S1 P"ystop"
    ; Z-Probe
    M558 P5 C"^zprobe.in" H5 F300 T8000 A3 S0.03 ; set z probe to SuperPINDA\\
    M557 X25:275 Y90:320 P15 ; probe from X= to , Y= to with a mesh spacing of mm
    G31 P1000 X23 Y5 Z-3.55
    M671 X-60:370 Y220:220 S10 ; leadscrews at rear left, front middle and rear right
    ; Heaters
    M308 S0 P"bedtemp" Y"thermistor" 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 ; enable bang-bang mode for the bed heater and set PWM limit
    M307 H1 B0 S1
    M140 H0 ; map heated bed to heater 0
    M143 H0 S120 ; set temperature limit for heater 0 to 120C
    M308 S1 P"e0temp" Y"thermistor" T100000 B4138 ; configure sensor 1 as thermistor on pin e0temp
    M950 H1 C"e0heat" T1 ; create nozzle heater output on e0heat and map it to sensor 1
    M307 H1 R2.370 K0.918:0.000 D6.00 E1.35 S1.00 B0 ; PID NOOZLE
    M307 H0 R0.895 K1.505:0.000 D9.94 E1.35 S1.00 B0 ; PID BED
    M143 H1 S280 ; set temperature limit for heater 1 to 280C
    ;ACELAROMETER
    M955 P0 C"spi.cs2+spi.cs1" ;S1344 R10 ; all wires connected to temp DB connector, no temperature daughterboard
    M953 P"zvd" F50
    ; Fans
    M950 F0 C"fan0" Q500 ; create fan 0 on pin fan0 and set its frequency
    M106 P0 S0 H-1 ; set fan 0 value. Thermostatic control is turned off
    M950 F1 C"fan1" Q500 ; create fan 0 on pin fan0 and set its frequency
    M106 P1 S0 H-1 ; set fan 0 value. Thermostatic control is turned off
    M950 F2 C"fan2" Q500 ; create fan 1 on pin fan1 and set its frequency
    M106 P2 S50 H1 T50 ; set fan 1 value. Thermostatic control is turned on
    ; Tools
    M563 P0 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

    Thank you

    undefined undefined 2 Replies Last reply 29 Nov 2023, 13:30 Reply Quote 0
    • undefined
      droftarts administrators @johny
      last edited by 29 Nov 2023, 13:30

      @johny You are homing the bed at the end of each run of the levelling macro, so I expect it's just the deviation in your bed, most likely the centre is bulging 0.64mm. Try running a bed mesh and see what it looks like.

      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

      undefined 1 Reply Last reply 29 Nov 2023, 14:14 Reply Quote 0
      • undefined
        johny @droftarts
        last edited by johny 29 Nov 2023, 14:14

        @droftarts Yes and no, i removed the G28 after the G32 to test and the behavior is the same but even if the Z gets homed in the center it shouldn't affect the bed tilt; the bed should keep leveled between left and right; homing will affect both Z axis and not only 1.
        Without mesh compensation, the G32 should level the 2 Z axis
        Edit: my bed is a thick 8mm aluminum block (not easy to bend)

        undefined 1 Reply Last reply 29 Nov 2023, 14:25 Reply Quote 0
        • undefined
          droftarts administrators @johny
          last edited by 29 Nov 2023, 14:25

          @johny You have a G28 at the beginning, too! The offset it the same both sides, and it only shows after you've homed, QED your bed isn't flat.

          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

          1 Reply Last reply Reply Quote 0
          • undefined
            fcwilt @johny
            last edited by fcwilt 29 Nov 2023, 15:08

            @johny

            You can use this sort of code to keep leveling the bed until a desired result is obtained or a specified number of attempts have been made.

            Doing a fixed number of repeats with no checking assumes things are working. The code below insures it actually is working.

            Note that this code was taken from a printer with three Z steppers, you would just change the three G30s to two.

            var success = false
            while true
            ; run leveling pass
            G30 P0 X-145 Y-65 Z-99999
            G30 P1 X0 Y100 Z-99999
            G30 P2 X145 Y-65 Z-99999 S3
            if move.calibration.initial.deviation < 0.02
            set var.success = true
            break
            ; check pass limit - exit loop if pass limit reached
            if iterations = 5
            break
            ; --- check for failure ---
            if !var.success
            set var.msg = "Unable to level bed - pass limit reached"
            M291 R{var.msg} P"Aborting" S2
            abort var.msg

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

            undefined 1 Reply Last reply 29 Nov 2023, 15:21 Reply Quote 0
            • undefined
              johny @fcwilt
              last edited by 29 Nov 2023, 15:21

              @fcwilt After the first iteration the level is ok the problem is that every time it calibrates it doesn't fix the calibration.
              Example:
              1 macro with 2 calibrations

              • 1º iteration detects 0,6mm difference and adjust
              • 2º iteration detects only 0,01 difference
                I would assume its leveled

              Run the macro again

              • 1º iteration detects 0,6mm difference and adjust
              • 2º iteration detects only 0,01 difference

              It doesn't make any sense because this is a non-ending loop, after successful calibration if I run it again it will always detect the same difference.

              @droftarts I don't understand how the small wobble of 0,01mm on a 6mm plate makes a 0,6mm difference between the 2 Z leadscrews and keeps this difference after calibration. Even if my bed was completely off the G32 should calibrate between the 2 led screws no? Btw i am not speaking about offset

              undefined undefined 2 Replies Last reply 29 Nov 2023, 15:41 Reply Quote 0
              • undefined
                droftarts administrators @johny
                last edited by 29 Nov 2023, 15:41

                @johny
                08a5da80-9a64-4076-8a77-d7a77d70a17c-image.png

                The first adjustment is made relative to Z0, which is set by homing Z, which the macro is doing at the start (or it's done at the end). The first two points reported are the measured offset from Z0 of EACH probe point, and both are about 0.64mm out, ie level with each other, just offset from the central Z0. Subsequent adjustments are done relative to this new offset, and are effectively 0.001mm out.
                But then you home Z again, and reset the Z0 point, before the next iteration.

                Like I said, your bed is warped, or possibly the weight of the X carriage is causing a rotation around the X axis, or a droop, so the probe is closer to the bed in the middle than at the ends. Or you are probing off the edge of the PEI sheet at the ends, but on the sheet in the middle.

                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

                1 Reply Last reply Reply Quote 0
                • undefined
                  infiniteloop @johny
                  last edited by 29 Nov 2023, 15:43

                  @johny can you tell us what printer you're using?

                  undefined 1 Reply Last reply 29 Nov 2023, 16:00 Reply Quote 0
                  • undefined
                    johny @infiniteloop
                    last edited by 29 Nov 2023, 16:00

                    @droftarts i think finally i understood what you said, you say that the points on both Z leadscrews are at the same position relative to Z0 and leveled but they are not, the bed is 0,6mm off on the right. How should it look like my bed.g and homeall.g ?

                    @infiniteloop custom-made BLV cube

                    undefined undefined 2 Replies Last reply 29 Nov 2023, 16:23 Reply Quote 0
                    • undefined
                      droftarts administrators @johny
                      last edited by 29 Nov 2023, 16:23

                      @johny said in G32 doesnt save after True Bed Leveling:

                      but they are not, the bed is 0,6mm off on the right.

                      No, that's not quite right.

                      Leadscrew adjustments made: -0.649 -0.645, points used 2, (mean, deviation) before (-0.647, 0.001) after (0.000, 0.000)
                      

                      -0.649 -0.645, points used 2: The first set of points is the measured variation from Z=0 for each point
                      (mean, deviation) before (-0.647, 0.001): This is the average (mean) of the two points, and the amount each is off (deviation) from this average.
                      after (0.000, 0.000): The "after" shows the average, and the deviation from average, it is after the correction.

                      So it is not off 0.6mm on the right. As far as the firmware is concerned, these two points are level with each other. They just happen to be 0.64mm below (or above, I can't remember which way the signs go) Z0 in the middle of the bed.

                      Like I said, do a bed mesh. It may be enlightening.

                      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

                      undefined 1 Reply Last reply 29 Nov 2023, 16:26 Reply Quote 0
                      • undefined
                        johny @droftarts
                        last edited by 29 Nov 2023, 16:26

                        @droftarts Will do it and record a video as well because after the first iteration only the right motor gets calibrated.
                        I will create another macro without G28 to see.

                        undefined undefined undefined 3 Replies Last reply 29 Nov 2023, 16:28 Reply Quote 0
                        • undefined
                          jay_s_uk @johny
                          last edited by 29 Nov 2023, 16:28

                          @johny thats typically the way RRF works. The first z motor remains static and the rest of the motors are adjusted to match the first

                          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
                          • undefined
                            droftarts administrators @johny
                            last edited by 29 Nov 2023, 16:36

                            @johny It applies a rotation around the origin ie X0 Y0 Z0. If your origin is front left, then yes, most of the movement will be on the right hand side. If your origin is in the middle, the adjustment is usually equal.

                            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

                            undefined 1 Reply Last reply 29 Nov 2023, 16:56 Reply Quote 0
                            • undefined
                              infiniteloop @johny
                              last edited by 29 Nov 2023, 16:36

                              @johny said in G32 doesnt save after True Bed Leveling:

                              custom-made BLV cube

                              Thank you. I just thought of the faint possibility of the Z-steppers loosing microsteps, but after all, I think @droftarts is on the right track.

                              1 Reply Last reply Reply Quote 0
                              • undefined
                                fcwilt @droftarts
                                last edited by 29 Nov 2023, 16:56

                                @droftarts

                                I don't know if G32 behaves differently with two Z steppers but on my three stepper printer, which has 0,0 in the middle of the bed, it appears that the 1st Z stepper is not used during leveling.

                                I know when doing it on my printers with three "thumbscrews" for leveling, the adjustments have always called for on the 2nd and 3rd thumbscrews.

                                Which makes sense since the outcome will be the same as adjusting all three steppers/thumbscrews.

                                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
                                  fcwilt @johny
                                  last edited by 29 Nov 2023, 17:01

                                  @johny said in G32 doesnt save after True Bed Leveling:

                                  @droftarts Will do it and record a video as well because after the first iteration only the right motor gets calibrated.
                                  I will create another macro without G28 to see.

                                  From the current docs on G32 and bed leveling:

                                  If your bed is not perfectly flat or the gantry sags a little when the head is over the middle of the bed, the process will cause a small shift in the Z=0 position. To correct this, if you are using the Z probe to do Z homing, you can just re-home Z at the end of your bed.g file.

                                  Based on that you want to keep the G28 Z

                                  I don't home with the probe but I have always re-set the Z=0 Datum after leveling the bed.

                                  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

                                  undefined 1 Reply Last reply 29 Nov 2023, 17:23 Reply Quote 0
                                  • undefined
                                    johny @fcwilt
                                    last edited by 29 Nov 2023, 17:23

                                    What about G32 using absolute position instead of relative?

                                    undefined 1 Reply Last reply 29 Nov 2023, 17:30 Reply Quote 0
                                    • undefined
                                      droftarts administrators @johny
                                      last edited by 29 Nov 2023, 17:30

                                      @johny said in G32 doesnt save after True Bed Leveling:

                                      What about G32 using absolute position instead of relative?

                                      What are you trying to achieve? I don't think switching G32 to relative moves will make any difference, or it will produce an error, though I've never tried.

                                      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

                                      undefined 1 Reply Last reply 29 Nov 2023, 22:22 Reply Quote 0
                                      • undefined
                                        johny @droftarts
                                        last edited by 29 Nov 2023, 22:22

                                        @droftarts Just trying to be able to print correctly the first layer on the entire 300mm bed 😞
                                        I made a new macro and its correct, without the g28 it doesn't correct anymore.
                                        How do you suggest starting the print? Like this?

                                        G28 XY
                                        M561 ; Clear any bed transform
                                        G1 X1... Y... ; Move Probe to middle of bed
                                        G30
                                        G29 S1

                                        undefined undefined 2 Replies Last reply 29 Nov 2023, 22:29 Reply Quote 0
                                        • undefined
                                          fcwilt @johny
                                          last edited by 29 Nov 2023, 22:29

                                          @johny

                                          It's just possible that using G28 Z is the source of the problem because, in addition to invoking homeZ.g, it first marks the axis as un-homed.

                                          As I mentioned I don't home with the Z probe but I do set the Z=0 Datum after bed leveling by doing a G30 at the center of the bed, but it doesn't changed the homed state of anything that is already homed.

                                          Maybe the un-homing that occurs with the G28 Z causes the firmware to "forget" the adjustments made during bed leveling.

                                          Just thinking out loud here.

                                          And since you are supposed to set the Z=0 Datum using the same XY position when creating the height map and when loading the height map you can follow the bed leveling with a G30 to set the Z=0 Datum and then load the height map and all should be fine.

                                          It has always worked for me.

                                          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
                                          3 out of 63
                                          • First post
                                            3/63
                                            Last post
                                          Unless otherwise noted, all forum content is licensed under CC-BY-SA