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

    PanelDue and Motors will not function properly with Duet Wifi

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    11
    80
    3.8k
    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

      Don't mess with motor wiring ot M569 to get the homing direction right. Change only the commands in the homing files.

      Please post the contents of your homing files, and confirm the locations of your endstop switches.

      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

      firex726undefined 1 Reply Last reply Reply Quote 0
      • firex726undefined
        firex726 @dc42
        last edited by

        @dc42 said in PanelDue and Motors will not function properly with Duet Wifi:

        Don't mess with motor wiring ot M569 to get the homing direction right. Change only the commands in the homing files.

        Please post the contents of your homing files, and confirm the locations of your endstop switches.

        Hi there,

        Both endstops are triggered near Alpha in the previously posted photo. With the "Front" being the side with the two motors.

        I changed X to be at the Highend so now it'll move and trigger with no other meddling, but of course it's now at +280 instead of 0.

        config.g

        ; Endstops

        M574 X2 S1 P"xstop"

        M574 Y1 S1 P"ystop"

        M574 Z1 S1 P"!zstop"

        homex.g

        G91

        G1 H2 Z5 F600

        G1 H1 X285 F600

        G1 X-5 F600

        G1 H1 X285 F180

        G1 H2 Z-5 F600

        G90

        homeall.g

        G91

        G1 H2 Z5 F600

        G1 H1 X285 Y-285 F600

        G1 H1 X285

        G1 H1 Y-285

        G1 X-5 Y5 F600

        G1 H1 X285 F180

        G1 H1 Y-285

        G1 H1 Z-285 F180

        G90

        G92 Z0

        A Former User? Phaedruxundefined 2 Replies Last reply Reply Quote 0
        • A Former User?
          A Former User @firex726
          last edited by

          @firex726 said in PanelDue and Motors will not function properly with Duet Wifi:

          M574 X2 S1 P"xstop"

          https://duet3d.dozuki.com/Wiki/Gcode#Section_M574_Set_endstop_configuration
          Xnnn Position of X endstop: 0 = none, 1 = low end, 2 = high end.

          X2 will give you 280. X1 will give you 0.

          firex726undefined 1 Reply Last reply Reply Quote 0
          • firex726undefined
            firex726 @A Former User
            last edited by

            @bearer said in PanelDue and Motors will not function properly with Duet Wifi:

            @firex726 said in PanelDue and Motors will not function properly with Duet Wifi:

            M574 X2 S1 P"xstop"

            https://duet3d.dozuki.com/Wiki/Gcode#Section_M574_Set_endstop_configuration
            Xnnn Position of X endstop: 0 = none, 1 = low end, 2 = high end.

            X2 will give you 280. X1 will give you 0.

            I understand, but if it's X1 I get 0 and then it wont mover left or right, since it wont move into a negative, just like how it wont move beyond 280 since that's what I set the far limit to. And otherwise it'll slam into the endstop flag if I moved it using a positive movement command.

            If I set it for X2 then it's at +280 and I can move it using negative movement commands, but I don't think I've seen an option in Cura to invert an axis movement commands. That and it'd all be mirrored based off the way it'd appear in the slicer, wouldn't it?

            1 Reply Last reply Reply Quote 0
            • A Former User?
              A Former User
              last edited by

              In a cartesian printer i would say your motor turns the wrong direction, but not familiar with corexy. In any case if you want X=0 when homing you need to use X1 as a parameter.

              firex726undefined 1 Reply Last reply Reply Quote 0
              • firex726undefined
                firex726 @A Former User
                last edited by

                @bearer said in PanelDue and Motors will not function properly with Duet Wifi:

                In a cartesian printer i would say your motor turns the wrong direction, but not familiar with corexy. In any case if you want X=0 when homing you need to use X1 as a parameter.

                Thanks for the suggestion, yea it's my first CoreXY too. I guess the big question is where in the files is it defined that X home is next to Beta motor? I guess worst case I can just dismantle the carriage and flip it so it'll be correct, but I've seen commercial and hobbyist printers with the motors at the front.

                Flipping just the one results in the axis being flipped when moving.

                A Former User? 1 Reply Last reply Reply Quote 0
                • A Former User?
                  A Former User @firex726
                  last edited by A Former User

                  @firex726 said in PanelDue and Motors will not function properly with Duet Wifi:

                  I guess the big question is where in the files is it defined that X home is next to Beta motor?

                  its between M208 that defines the min/max value, and M574 X1/X2 that defines if the home value is at the min or max value.

                  firex726undefined 1 Reply Last reply Reply Quote 0
                  • firex726undefined
                    firex726 @A Former User
                    last edited by

                    @bearer said in PanelDue and Motors will not function properly with Duet Wifi:

                    @firex726 said in PanelDue and Motors will not function properly with Duet Wifi:

                    I guess the big question is where in the files is it defined that X home is next to Beta motor?

                    its between M280 that defines the min/max value, and M574 X1/X2 that defines if the home value is at the min or max value.

                    Just in case I tried swapping both M208 and M574, as well at each individually and same end effect. With a positive movement making it move further into the endstop and negative away like I intend.

                    I wonder, instead of defining it has having X280, Y280, and Z280, could I change it to X-280, Y280, and Z280.

                    infiniteloopundefined 1 Reply Last reply Reply Quote 0
                    • infiniteloopundefined
                      infiniteloop @firex726
                      last edited by

                      @firex726 said in PanelDue and Motors will not function properly with Duet Wifi:

                      Just in case I tried swapping both M208 and M574, as well at each individually and same end effect. With a positive movement making it move further into the endstop and negative away like I intend.

                      Time for a mental reboot. – Looking at X and Y, you can move your print head along these axes, and, with the end stops, you can tell the Duet which coordinate to reference for any further moves. You’ve got your steps/mm right…

                      That are the basics. Now, a second concept comes into play: a coordinate system you and your slicer understand. Just to be clear: Cura is quite flexible, so it’s up to you which idea you are most comfortable with.

                      The origin of this system can be in any corner, it can even be in the center of your bed, leaving you with 4 quadrants to deal with. In config.g, you use M208 to define the area your head can reach, in coordinates relative to the origin you want. These can be negative, too - remember, the end stops are only an initial reference point.

                      This is key: select an origin of your choice, then, stay with that. If something goes wrong, it’s just a question of Gcodes.

                      Homing just means to confirm the minimum or maximum coordinate you have defined in M208. It’s that simple. If you become comfortable with your coordinate system, it is easy to detect when a stepper’s direction is inverted. Just invert it in Gcode: dunnit.

                      firex726undefined 1 Reply Last reply Reply Quote 0
                      • firex726undefined
                        firex726 @infiniteloop
                        last edited by

                        @infiniteloop said in PanelDue and Motors will not function properly with Duet Wifi:

                        @firex726 said in PanelDue and Motors will not function properly with Duet Wifi:

                        Just in case I tried swapping both M208 and M574, as well at each individually and same end effect. With a positive movement making it move further into the endstop and negative away like I intend.

                        This is key: select an origin of your choice, then, stay with that. If something goes wrong, it’s just a question of Gcodes.

                        Homing just means to confirm the minimum or maximum coordinate you have defined in M208. It’s that simple. If you become comfortable with your coordinate system, it is easy to detect when a stepper’s direction is inverted. Just invert it in Gcode: dunnit.

                        Well that's what I thought I was doing... I have two other machines with their origin in the front left.

                        For M208 I tried it with the default min max at 0/280. And also flipped as 280/0 with the same movement behavior; as well as changing the endstop from Low side to High side, and also motor direction.

                        I'm not sure what other options I can flip...

                        Y has been behaving like I intend with no major fiddling, so that's why I assume it's only something with X.

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

                          @firex726 said in PanelDue and Motors will not function properly with Duet Wifi:

                          Both endstops are triggered near Alpha in the previously posted photo.

                          Are your motors at the back of the printer, or the front?

                          Perhaps could you post a photo of your printer showing the locations of things? That can help a lot getting us on the same page.

                          There's also the motor movement tests here: https://duet3d.dozuki.com/Wiki/ConfiguringRepRapFirmwareCoreXYPrinter

                          Z-Bot CoreXY Build | Thingiverse Profile

                          firex726undefined 1 Reply Last reply Reply Quote 0
                          • mrehorstdmdundefined
                            mrehorstdmd
                            last edited by

                            I don't know if it will help, but I did a blog post on setting up the origin and endstops so that the origin is at the center of the bed. If you use Cura, setting the origin at the center makes it especially easy to set up a custom printer because you simply check the "origin is at center" box and Cura will drop prints at the center of the bed.

                            See: https://drmrehorst.blogspot.com/2018/07/ummd-better-way-to-set-up-origin-and.html

                            https://drmrehorst.blogspot.com/

                            1 Reply Last reply Reply Quote 1
                            • firex726undefined
                              firex726 @Phaedrux
                              last edited by

                              @Phaedrux said in PanelDue and Motors will not function properly with Duet Wifi:

                              @firex726 said in PanelDue and Motors will not function properly with Duet Wifi:

                              Both endstops are triggered near Alpha in the previously posted photo.

                              Are your motors at the back of the printer, or the front?

                              Front... So in the previous diagram, Beta is to my right, and Alpha to my left.
                              The home for X and Y is the corner near Alpha; where both endstops are.

                              My intention is that Alpha corner is X0, and Beta is X+280. But with all my flipping it keeps wanting positive movement commands to move it further into Alpha.

                              I'll have to get home to test exactly, but as I recall if Alpha is 0 then positive moments will move it further into Alpha. And if it's set for +280 then I'll need to command it to move -280 over to Beta where it'll be at 0, and then positive commands will move like normal.

                              1 Reply Last reply Reply Quote 0
                              • firex726undefined
                                firex726
                                last edited by

                                Found an old photo, it has the motor mounts and I added the coordinates on where it's trying to move.

                                50C1B45g2.png

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

                                  Have you gone through the corexy setup link I posted above?

                                  Z-Bot CoreXY Build | Thingiverse Profile

                                  firex726undefined 1 Reply Last reply Reply Quote 0
                                  • firex726undefined
                                    firex726 @Phaedrux
                                    last edited by

                                    @Phaedrux said in PanelDue and Motors will not function properly with Duet Wifi:

                                    Have you gone through the corexy setup link I posted above?

                                    I'll double check, but as I recall I did, and the motor movement is OK unless I home them. Since it'll think they are someplace they are not.

                                    I think the issue is I have a Left hand system:

                                    Important: make sure that you have chosen a right-hand axis system. That is, looking down on the printer the +Y direction should be 90 degrees anticlockwise from the +X direction. If instead it is 90 degrees clockwise, you have a left-hand axis system, which will give you mirror-image prints.

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

                                      @firex726 said in PanelDue and Motors will not function properly with Duet Wifi:

                                      I think the issue is I have a Left hand system

                                      Yes, exactly.

                                      Cartesian-coordinate-system.png

                                      If you go through that link again you can at least verify that the motors are turning correctly.

                                      The rest comes down to getting the M208 min and max sizes correct, getting the endstop positions reflected accurately in M574, and then having the homing move directions correct in the homing macros.

                                      dbot axis.png
                                      Using this photo as an example

                                      M208 X0 Y0 Z0 S1 ; axis minima
                                      M208 X300 Y200 Z300 S0 ; axis maxima
                                      M574 X1 Y2 Z2 S1 ; x endstop at low end, y at high end, Z at high end.
                                      
                                      X homing moves are negative, Y homing moves are positive.
                                      

                                      Compare your setup to that photo and see what differs.

                                      Z-Bot CoreXY Build | Thingiverse Profile

                                      firex726undefined 1 Reply Last reply Reply Quote 0
                                      • firex726undefined
                                        firex726 @Phaedrux
                                        last edited by

                                        If you go through that link again you can at least verify that the motors are turning correctly.

                                        The rest comes down to getting the M208 min and max sizes correct, getting the endstop positions reflected accurately in M574, and then having the homing move directions correct in the homing macros.

                                        M208 X0 Y0 Z0 S1 ; axis minima
                                        M208 X300 Y200 Z300 S0 ; axis maxima
                                        M574 X1 Y2 Z2 S1 ; x endstop at low end, y at high end, Z at high end.
                                        
                                        X homing moves are negative, Y homing moves are positive.
                                        

                                        Compare your setup to that photo and see what differs.

                                        OK two parts...

                                        Now I remember, the article listed seems a bit out dated, I keep getting warnings of obsolete commands. As @dc42 noted, the commands I should use are "G1 H2 X20", which based off the article looks like it's working as intended. The carriage moves in a diagonal path towards +X/+Y.

                                        If the head moves diagonally in the +X and +Y directions, all is well.

                                        For your example photo, I redid mine to match, with the endstop in the back, and set X to low and Y to high.

                                        I tried the following config settings all with the same effect; the carriage follows negative homing commands moving it to the right (Beta) and away from the endstop (Alpha).

                                        M208 X0 Y0 Z0 S1 ; axis minima
                                        M208 X280 Y280 Z280 S0 ; axis maxima
                                        M574 X1 S1 P"xstop"
                                        M574 Y2 S1 P"ystop"


                                        M208 X280 Y0 Z0 S1 ; axis minima
                                        M208 X0 Y280 Z280 S0 ; axis maxima
                                        M574 X1 S1 P"xstop"
                                        M574 Y2 S1 P"ystop"


                                        M208 X0 Y0 Z0 S1 ; axis minima
                                        M208 X280 Y280 Z280 S0 ; axis maxima
                                        M574 X2 S1 P"xstop"
                                        M574 Y2 S1 P"ystop"

                                        1581365779245-dbot-axis.png

                                        Phaedruxundefined 2 Replies Last reply Reply Quote 0
                                        • Phaedruxundefined
                                          Phaedrux Moderator @firex726
                                          last edited by

                                          @firex726 said in PanelDue and Motors will not function properly with Duet Wifi:

                                          I should use are "G1 H2 X20"

                                          Did you send G91 first?

                                          Z-Bot CoreXY Build | Thingiverse Profile

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

                                            @firex726 said in PanelDue and Motors will not function properly with Duet Wifi:

                                            M208 X0 Y0 Z0 S1 ; axis minima
                                            M208 X280 Y280 Z280 S0 ; axis maxima
                                            M574 X1 S1 P"xstop"
                                            M574 Y2 S1 P"ystop"

                                            This one is correct. The others are not.

                                            Z-Bot CoreXY Build | Thingiverse Profile

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