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

    M581 with multiple endstops: does anyone use it?

    Scheduled Pinned Locked Moved
    General Discussion
    6
    11
    902
    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

      I am currently refactoring all the code that handles endstops, including the code that manages triggers set up by M581. The new code will take an "input number" instead of an endstop designation.

      It's going to be tricky to continue to support M581 commands that refer to multiple endstops. For example, currently you can write this:

      M581 T3 X Y E2 S1

      which means that a positive going edge on any of X, Y or E2 will run trigger3.g. Then you can canel all of these using:

      M581 T3 S-1

      What I would prefer to do is to base triggers on input ports. For example, you would be able to use the following to achieve the same effect:

      M581 C40 T3 S1
      M581 C41 T3 S1
      M581 C45 T3 S1

      and then you would need to cancel them individually.

      Do any of you use the facility to declare multiple inputs to a trigger in a single command, and if so, would this proposed approach be problematic to you?

      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
      • PuterProundefined
        PuterPro
        last edited by PuterPro

        I planned on using M581 as a backup Emergency Stop in case of BLTouch failure.

        I'm configured with Z and U dual steppers for Z on a CR-10S. I have endstops on both. Hadn't gotten to configuring yet ... Will I be able to use it for that after the change?

        EDIT: BTW - any chance you could take a quick peek at:
        https://forum.duet3d.com/topic/9889/upgrading-cr-10s-steppers-ps-to-24v-suggested-z-replacement/11

        I asked you some Q's and am stuck until you answer ... 😉

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

          @puterpro said in M581 with multiple endstops: does anyone use it?:

          I'm configured with Z and U dual steppers for Z on a CR-10S. I have endstops on both. Hadn't gotten to configuring yet ... Will I be able to use it for that after the change?

          Yes, but you will need to set up 2 separate triggers.

          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

          deckingmanundefined 1 Reply Last reply Reply Quote 0
          • deckingmanundefined
            deckingman @dc42
            last edited by

            @dc42 said in M581 with multiple endstops: does anyone use it?:

            @puterpro said in M581 with multiple endstops: does anyone use it?:

            I'm configured with Z and U dual steppers for Z on a CR-10S. I have endstops on both. Hadn't gotten to configuring yet ... Will I be able to use it for that after the change?

            Yes, but you will need to set up 2 separate triggers.

            Or, @PuterPro could do what I do and that is wire all the "extra" switches in series (normally closed) and connect them to a single end stop. Then use a single trigger which will work if either switch changes state.

            Ian
            https://somei3deas.wordpress.com/
            https://www.youtube.com/@deckingman

            1 Reply Last reply Reply Quote 0
            • PuterProundefined
              PuterPro
              last edited by

              @dc42 - Easy enough.

              @deckingman - That's clever, but I use them to independently home my dual Z, then pass control to a BLTouch to find Z Home. Need them independent at this point.

              I've pondered slaving the Z's with a belt and pulley setup, if I do it I'll use your idea.

              1 Reply Last reply Reply Quote 0
              • NicoLab28undefined
                NicoLab28
                last edited by

                For my part, I use one at a time.
                It smells good the fix

                1 Reply Last reply Reply Quote 0
                • Edgars Batnaundefined
                  Edgars Batna
                  last edited by Edgars Batna

                  I use it like this:

                  M581 E2:3 X1:0 Y1:0 S1 T0 C0

                  But don't ask me what this means - it's been over a year since I set it up. There's basically two endstops for X and Y and I need the machine to stop if it reaches them. Do what you need to, just let us know how to keep functionality.

                  1 Reply Last reply Reply Quote 0
                  • gtj0undefined
                    gtj0
                    last edited by

                    I use M581 with multiple endstops but would be perfectly fine with using multiple commands in the interest of decoupling the logical axis assignment from the physical input.

                    1 Reply Last reply Reply Quote 0
                    • gtj0undefined
                      gtj0
                      last edited by gtj0

                      @dc42 When you're done, will I be able to do the following...

                      With 7 endstop switches, say 0-6...
                      Home X with 0, Y with 1, Z with Probe
                      Calculate max X with 2, Y with 3 and Z with 4,5,6
                      THEN
                      set 2,3,4,5,6 as emergency stop switches?

                      (all without having to wire in series, etc)

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

                        Looks like the main reason to use multiple inputs to a trigger is to have all the endstops trigger an emergency stop. Maybe we should use a separate GCode command for that.

                        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
                        • PuterProundefined
                          PuterPro
                          last edited by

                          Looks like the main reason to use multiple inputs to a trigger is to have all the endstops trigger an emergency stop. Maybe we should use a separate GCode command for that.

                          And then there's this idea ... Sounds like the real solution, then you can rework M581 to your heart's content.

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