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

    Problem with 3 Independent Z-axis motors and Endstops

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    6
    32
    4.0k
    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.
    • dc42undefined
      dc42 administrators
      last edited by

      Make sure that in your homez.g sequence, you switch into relative movement mode using G91 before you make the G1 S1 ZUV move.

      Duet WiFi hardware designer and firmware engineer
      Please do not ask me for Duet support via PM or email, use the forum
      http://www.escher3d.com, https://miscsolutions.wordpress.com

      B3Dundefined 1 Reply Last reply Reply Quote 0
      • B3Dundefined
        B3D @dc42
        last edited by B3D

        Thanks for the suggestion @dc42, G91 is already there before the first M584 splitting the drives and before the G1 ZUV move in Homez.g, and the G90 is at the end.

        1 Reply Last reply Reply Quote 0
        • dc42undefined
          dc42 administrators
          last edited by

          Try adding M400 after the M584 command, before the G1 S1 command.

          Duet WiFi hardware designer and firmware engineer
          Please do not ask me for Duet support via PM or email, use the forum
          http://www.escher3d.com, https://miscsolutions.wordpress.com

          B3Dundefined 2 Replies Last reply Reply Quote 0
          • B3Dundefined
            B3D @dc42
            last edited by B3D

            @dc42 Adding M400 after M584 did not resolve the issue. In fact, adding M400 after the second M584 caused homez.g to hang.

            homez.g
            ; Home 3 Independent Z-Axis Drives

            M117 Homing Z axis...
            M400 ; Wait for movement to stop

            G91 ; relative positioning

            M584 X0 Y1 Z2 U3 V4 E5 P5 ; separate Z axis motors. P5 to display/drive 5 axis.
            M400 ; Wait for movement to stop

            ; The second time Homez is run, only the Z axis moves with this command (U and V do not move).
            ; Homez then hangs here for a couple of minutes, before continuing ...
            G1 Z400 U400 V400 F500 S1 ; lower all z motors until each corresponding z-stop reached

            G1 V-3 F200 S2 ; raise Z3 axis slowly (S2 Ignore endstops and ignore axis not homed)
            G1 V10 F200 S1 ; lower Z3 motor slowly until its endstop reached
            G1 V-3 F200 S2 ; raise Z3 axis slowly (S2 Ignore endstops and ignore axis not homed)
            M400 ; Wait for movement to stop

            G1 U-3 F200 S2 ; raise Z2 axis slowly (S2 Ignore endstops and ignore axis not homed)
            G1 U10 F200 S1 ; lower Z2 motor slowly until its endstop reached
            G1 U-3 F200 S2 ; raise Z2 axis slowly (S2 Ignore endstops and ignore axis not homed)
            M400 ; Wait for movement to stop

            G1 Z-3 F200 S2 ; raise Z1 axis slowly (S2 Ignore endstops and ignore axis not homed)
            G1 Z10 F200 S1 ; lower Z1 motor slowly until its endstop reached
            G1 Z-3 F200 S2 ; raise Z1 axis slowly (S2 Ignore endstops and ignore axis not homed)
            M400 ; Wait for movement to stop

            ; This test move before combining axis works
            G1 Z-5 U-5 V-5 F200 S2 ; raise Z1 axis slowly (S2 Ignore endstops and ignore axis not homed)
            M400 ; Wait for movement to stop

            M584 X0 Y1 Z2:3:4 E5 P3 ; Combine Z, U and V. P3 to display/drive 3 axis.

            ; Adding M400 here caused the homez.g to hang
            ;M400 ; Wait for movement to stop

            ; This test move after combining axis also works now
            G1 Z-5 F200 ; test raise all axis slowly
            M400 ; Wait for movement to stop

            G90 ; absolute positioning
            M400 ; Wait for movement to stop

            M117 Homing Z axis done

            1 Reply Last reply Reply Quote 0
            • B3Dundefined
              B3D @dc42
              last edited by

              HI @dc42. Wondering if you had any further insight into this issue. Is it a firmware bug, or something with the configurations/gcode? Thanks.

              1 Reply Last reply Reply Quote 0
              • dc42undefined
                dc42 administrators
                last edited by

                I'll need to replicate your configuration and test it - that's on my list to do.

                Duet WiFi hardware designer and firmware engineer
                Please do not ask me for Duet support via PM or email, use the forum
                http://www.escher3d.com, https://miscsolutions.wordpress.com

                1 Reply Last reply Reply Quote 0
                • dc42undefined
                  dc42 administrators
                  last edited by dc42

                  I've finally got round to testing this. There is certainly something odd going on. More later.

                  Duet WiFi hardware designer and firmware engineer
                  Please do not ask me for Duet support via PM or email, use the forum
                  http://www.escher3d.com, https://miscsolutions.wordpress.com

                  1 Reply Last reply Reply Quote 0
                  • dc42undefined
                    dc42 administrators
                    last edited by dc42

                    The strange behaviour I observed was because my config.g file already created an A axis before I added your bits. I fixed that, and now the Z homing of the 3 motors independently is working correctly. Both the original Z homing file in your original post and the most recent one that you posted work.

                    The only changes I made to your files were to change the M574 command to use NC switches, which is what my test rig has. The firmware I am using is slightly later than 2.02RC2.

                    I did find that adding the extra M400 command in homez.g caused the movement system to lock up, as you reported. I will fix this before I release 2.02RC4.

                    The config I am using is for a Cartesian printer. Is that what you are using, or is your printer a CoreXY? It may help if you post your complete config.g file.

                    Duet WiFi hardware designer and firmware engineer
                    Please do not ask me for Duet support via PM or email, use the forum
                    http://www.escher3d.com, https://miscsolutions.wordpress.com

                    dc42undefined 1 Reply Last reply Reply Quote 0
                    • dc42undefined
                      dc42 administrators @dc42
                      last edited by dc42

                      PS:

                      1. On machines with heavy beds and high Z steps/mm, one possible cause of a Z motor sometimes moving the bed down when it should move up is that you are using too high a Z speed, acceleration or jerk; or just too low a current for the motors you are using.

                      2. If the Z motors that correspond to U or V move the wrong way after they are recombined, that can because by the U and V axes still being visible. You can run M584 without parameters to check the axis mapping and visibility.

                      Duet WiFi hardware designer and firmware engineer
                      Please do not ask me for Duet support via PM or email, use the forum
                      http://www.escher3d.com, https://miscsolutions.wordpress.com

                      1 Reply Last reply Reply Quote 0
                      • dc42undefined
                        dc42 administrators
                        last edited by dc42

                        It turned out that the "hang" when the extra M400 was added wasn't really a firmware hang, it was that the next move was being carried out so slowly that it was hard to see the motors move. I've fixed it in my latest firmware build. The same bug might have been responsible for other strange behaviour when axes are changed from visible to hidden and vice versa; so please try firmware 2.02RC4 on your machine when I release it - later today I hope.

                        Duet WiFi hardware designer and firmware engineer
                        Please do not ask me for Duet support via PM or email, use the forum
                        http://www.escher3d.com, https://miscsolutions.wordpress.com

                        1 Reply Last reply Reply Quote 0
                        • B3Dundefined
                          B3D
                          last edited by

                          The Z axis rotating in wrong direction was due to stepper current being too low. Thanks for that pointer!

                          Running CoreXY. Tested with firmware 2.02RC4. First Z axis move after recombining is carried out extremely slowly. Regardless of F value or distance it takes about 30 seconds to complete. I can see all three z axis motors turning very slowly.

                          dc42undefined 1 Reply Last reply Reply Quote 0
                          • dc42undefined
                            dc42 administrators @B3D
                            last edited by dc42

                            @b3d said in Problem with 3 Independent Z-axis motors and Endstops:

                            Running CoreXY. Tested with firmware 2.02RC4. First Z axis move after recombining is carried out extremely slowly. Regardless of F value or distance it takes about 30 seconds to complete. I can see all three z axis motors turning very slowly.

                            Is that when using the same homez.g file that you posted earlier? If not, please post your current homez.g file.

                            Duet WiFi hardware designer and firmware engineer
                            Please do not ask me for Duet support via PM or email, use the forum
                            http://www.escher3d.com, https://miscsolutions.wordpress.com

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