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

    Dual Z motors and compensation programing questions

    Scheduled Pinned Locked Moved
    General Discussion
    3
    18
    1.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.
    • fcwiltundefined
      fcwilt
      last edited by

      Great.

      In your bed.g file you have:

      M561
      G29
      

      This is not correct for bed leveling using multiple Z steppers.

      The command to start bed leveling is G32 and it invokes bed.g.

      So bed.g must contain the commands needed for bed leveling - not the commands you have for creating a height map.

      Here is my bed.g on my printer which has 3 Z steppers:

      ;  set positions of ball studs for auto-leveling (S is max allowed adjustment)
      
      M671 X-180:0:180 Y-65:130:-65 S3
      
      ; level the bed
      
      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 and perform leveling
      
      ; set the Z=0 datum which may have changed due to bed leveling
      
      ; step 1 - move probe to center of bed
      
      G1 X{-sensors.probes[0].offsets[0]}, Y{-sensors.probes[0].offsets[1]}, F6000
      
      ; step 2 - do single probe which sets Z to trigger height of Z probe
      
      G30
      

      Does that make sense to you?

      I will be glad to explain but I just followed the documentation for auto bed leveling.

      Frederick

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

      Tpmosesundefined 1 Reply Last reply Reply Quote 1
      • Tpmosesundefined
        Tpmoses @fcwilt
        last edited by

        @fcwilt Okay, I will update my bed.g, do I need to add anything to the other home files? I am just not sure what uses the bed.g file/ what calls for it.

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

          @Tpmoses said in Dual Z motors and compensation programing questions:

          @fcwilt Okay, I will update my bed.g, do I need to add anything to the other home files? I am just not sure what uses the bed.g file/ what calls for it.

          The homing files should not affect this process in any way.

          The bed.g file is invoked by the command G32 which is the command used for both manual and automatic bed leveling.

          Here is the DWC pull-down menu showing the item True Bed Leveling (G32).

          Selecting that item will run bed.g so bed.g must have the commands needed to perform bed leveling.

          Frederick

          Duet 3 DWC Comp & Cal Pulldown Menu.png

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

          Tpmosesundefined 1 Reply Last reply Reply Quote 2
          • Tpmosesundefined
            Tpmoses @fcwilt
            last edited by

            @fcwilt Okay, I updated my bed.g. It runs the program, and it probes at both leadscrews. The only Issue I can ee now is that it doesn't adjust the z motor to make the gantry level now. any suggestions?

            T

            fcwiltundefined 1 Reply Last reply Reply Quote 0
            • Tpmosesundefined
              Tpmoses
              last edited by

              When I run G32 I get this in the console

              G32
              Error: Some computed corrections exceed configured limit of 1.00mm: -0.669 -2.140

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

                @Tpmoses said in Dual Z motors and compensation programing questions:

                @fcwilt Okay, I updated my bed.g. It runs the program, and it probes at both leadscrews. The only Issue I can ee now is that it doesn't adjust the z motor to make the gantry level now. any suggestions?

                T

                Hi,

                Post your updated bed.g file and let's see what it looks like.

                About the message: increase the S parameter in the M671 command.

                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
                • Tpmosesundefined
                  Tpmoses
                  last edited by

                  Here is my new Bed.g,

                  ; bed.g
                  ; called to perform automatic bed compensation via G32
                  ;
                  ; generated by RepRapFirmware Configuration Tool v3.2.2 on Fri Jan 22 2021 11:13:01 GMT-0600 (Central Standard Time)
                  M561 ; clear any bed transform
                  
                  G28 ; home
                  
                  G30 P0 X0 Y450 Z-99999 					; probe near a leadscrew, half way along Y axis
                  G30 P1 X1170 Y450 Z-99999 S2		 ; probe near a leadscrew and calibrate 2 motors
                  
                  
                  

                  The M671 command is in my config.g like the guide had said, however I didn't have an S value there. I will add that and see what it does.

                  fcwiltundefined 1 Reply Last reply Reply Quote 0
                  • Tpmosesundefined
                    Tpmoses
                    last edited by

                    As well as the probe offset is in config.g

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

                      @Tpmoses said in Dual Z motors and compensation programing questions:

                      The M671 command is in my config.g like the guide had said, however I didn't have an S value there. I will add that and see what it does.

                      I don't know why that command is put into config.g.

                      It's part of bed leveling so I put it into bed.g along with all the other bed leveling commands so I can see at a glance all relevant values.

                      Also there is no G30 in the bed.g file so you should add this to your bed.g file.

                      ; set the Z=0 datum which may have changed due to bed leveling
                      ; -- step 1 - move probe to center of bed
                      G1 X{-sensors.probes[0].offsets[0]}, Y{-sensors.probes[0].offsets[1]}, F6000
                      ; -- step 2 - do single probe which sets Z to trigger height of Z probe
                      G30```

                      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
                      • Tpmosesundefined
                        Tpmoses
                        last edited by

                        It looks like the S value in the M671 was the issue. I didn't have it specified, so it defaulted too small. I'm not sure why it is in config.g, that is just where the guide i was using Bed levelling using multiple independent Z motors said to put it.

                        I will add that secondary homing to bed.g and go from there. Thank you for your help!

                        Thanks,
                        T

                        fcwiltundefined engikeneerundefined 2 Replies Last reply Reply Quote 0
                        • fcwiltundefined
                          fcwilt @Tpmoses
                          last edited by

                          @Tpmoses said in Dual Z motors and compensation programing questions:

                          I'm not sure why it is in config.g, that is just where the guide i was using [Bed levelling using multiple independent Z motors]>

                          Several things get tossed into config.g that I just happen to think belong elsewhere, like M671. It is part of bed leveling so why not put it into bed.g along with all the other bed leveling commands.

                          It's not that having them in config.g is wrong, they will work there just fine, it's just not the way my mind works.

                          I will add that secondary homing to bed.g and go from there. Thank you for your help!

                          The commands I mentioned to add to bed.g are not homing commands, they are commands to set the Z=0 datum.

                          Bed leveling can change that value so it is safest to reset it so it is correct after bed.g is complete.

                          Setting the Z=0 datum needs to be done at other times so not being in bed.g doesn't mean things won't work but why not set it there just to be safe.

                          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 1
                          • engikeneerundefined
                            engikeneer @Tpmoses
                            last edited by

                            @Tpmoses just to contradict @fcwilt here... I just run homeZ (G28 Z) at the end of my bed.g. in my case my homeZ just uses a z probe at a set point, so it means I can make sure I always probe the same point to reset the Z datum. If you use an endstop in your homeZ (e.g. in a delta printer), then this won't work and you'll have to use fcwilt's method (or something similar).

                            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

                            fcwiltundefined 1 Reply Last reply Reply Quote 2
                            • fcwiltundefined
                              fcwilt @engikeneer
                              last edited by fcwilt

                              @engikeneer said in Dual Z motors and compensation programing questions:

                              @Tpmoses just to contradict @fcwilt here... I just run homeZ (G28 Z) at the end of my bed.g. in my case my homeZ just uses a z probe at a set point, so it means I can make sure I always probe the same point to reset the Z datum. If you use an endstop in your homeZ (e.g. in a delta printer), then this won't work and you'll have to use fcwilt's method (or something similar).

                              Good point.

                              While I have a Z probe I also always install a Z end stop sensor, one per Z stepper.

                              The normal probing speed for one of my probes is 300 or less - depending on type of probe.

                              Homing using the end stop sensors is much quicker since the normal homing speed is 1200 or more.

                              My apologies for failing to mention this.


                              I should also point out that the formula I posted for probing the center of the bed...

                              G1 X{0 - sensors.probes[0].offsets[0]}, Y{0 - sensors.probes[0].offsets[1]}, F6000

                              ...is based on my printers co-ordinates for bed center - which are X=0 and Y=0

                              The formula will work regardless if you change each 0 before the minus sign to the correct value for your bed center.

                              I only showed the formula there by way of demonstration. I don't actually do that but wanted to keep things simple. I actually have a macro that I call to set the Z=0 datum as needed and it does use the formula. But since I always call the macro I always use the same XY co-ordinates.

                              Again my apologies - I keep forgetting that not everyone uses 0,0 as bed center.


                              Thanks.

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