• Tags
  • Documentation
  • Order
  • Register
  • Login
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.
  • undefined
    dc42 administrators
    last edited by 5 Apr 2019, 15:36

    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
    • undefined
      PuterPro
      last edited by PuterPro 4 May 2019, 15:51 5 Apr 2019, 15:49

      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 ... 😉

      undefined 1 Reply Last reply 5 Apr 2019, 15:55 Reply Quote 0
      • undefined
        dc42 administrators @PuterPro
        last edited by 5 Apr 2019, 15:55

        @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

        undefined 1 Reply Last reply 5 Apr 2019, 16:05 Reply Quote 0
        • undefined
          deckingman @dc42
          last edited by 5 Apr 2019, 16:05

          @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
          • undefined
            PuterPro
            last edited by 5 Apr 2019, 16:15

            @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
            • undefined
              NicoLab28
              last edited by 5 Apr 2019, 17:29

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

              1 Reply Last reply Reply Quote 0
              • undefined
                Edgars Batna
                last edited by Edgars Batna 4 May 2019, 17:49 5 Apr 2019, 17:46

                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
                • undefined
                  gtj0
                  last edited by 5 Apr 2019, 19:22

                  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
                  • undefined
                    gtj0
                    last edited by gtj0 4 May 2019, 19:45 5 Apr 2019, 19:44

                    @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
                    • undefined
                      dc42 administrators
                      last edited by 6 Apr 2019, 09:48

                      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
                      • undefined
                        PuterPro
                        last edited by 6 Apr 2019, 12:42

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