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

    How to log triggering of endstop microswitches

    Scheduled Pinned Locked Moved
    Tuning and tweaking
    6
    16
    335
    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.
    • Trietundefined
      Triet @Triet
      last edited by

      @Triet
      Again, in the documentation of the M574 command ("Set endstop configuration") I can read:

      "Pull up resistors on Duet 2/Duex5 inputs should be configured for connecting a digital inputs (like a switch, BLtouch, etc) only on inputs not labelled "n"Stop (xstop, ystop etc)."

      So it states clearly that no pull up resistors should be "configured". Does that refer to the built-in resistors or does that imply that no external additional pull up resistor should be connected?

      I don't understand why the user is supposed to tinker with the Duet board (like soldering resistors) in order to do something that is even recommended in by the vendor.

      oliofundefined Trietundefined 2 Replies Last reply Reply Quote 0
      • oliofundefined
        oliof @Triet
        last edited by

        @Triet you can enable the pullups in the board config by prepending the pin identifier with ^, i.e. ^xendstop

        <>RatRig V-Minion Fly Super5Pro RRF<> V-Core 3.1 IDEX k*****r <> RatRig V-Minion SKR 2 Marlin<>

        Trietundefined 1 Reply Last reply Reply Quote 0
        • Trietundefined
          Triet @Triet
          last edited by

          @Triet said in How to log triggering of endstop microswitches:

          "Pull up resistors on Duet 2/Duex5 inputs should be configured for connecting a digital inputs (like a switch, BLtouch, etc) only on inputs not labelled "n"Stop (xstop, ystop etc)."

          Reading more carefully, this might be valid only for Duet2 boards used together with a Duex5 expansion board. This wording is unfortunate, as it is not clear how exactly it is meant: Duet2 alone OR Duet2+Duex5?
          I do not use Duex5.

          gloomyandyundefined 1 Reply Last reply Reply Quote 0
          • Trietundefined
            Triet @oliof
            last edited by

            @oliof said in How to log triggering of endstop microswitches:

            @Triet you can enable the pullups in the board config by prepending the pin identifier with ^, i.e. ^xendstop

            OK, I will try changing my config lines to

            M574 X1 S1 P"^xstop"
            M574 Y2 S1 P"^ystop"

            and see how it goes.
            Thanks for confirming.

            1 Reply Last reply Reply Quote 0
            • gloomyandyundefined
              gloomyandy @Triet
              last edited by

              @Triet The Duet2 endstops already have a pull up resistor on them. You can see the details here: https://docs.duet3d.com/User_manual/Connecting_hardware/Sensors_endstops along with the recommendation to use normally closed switches with the switch between ground and the input pin.

              Trietundefined 1 Reply Last reply Reply Quote 0
              • Trietundefined
                Triet @gloomyandy
                last edited by

                @gloomyandy said in How to log triggering of endstop microswitches:

                The Duet2 endstops already have a pull up resistor on them.

                Thanks, that is fine. I have already enabled them.

                gloomyandyundefined 1 Reply Last reply Reply Quote 0
                • gloomyandyundefined
                  gloomyandy @Triet
                  last edited by

                  @Triet You don't need to enable a pullup, the board has them built in on the endstop inputs as part of the circuit that includes the indicator LEDs. Take a look at the link I included it is all explained under the Duet2 tab. That same link also explains what the best way is to wire your endstops to avoid emi issues.

                  1 Reply Last reply Reply Quote 0
                  • Trietundefined
                    Triet @moth4017
                    last edited by

                    @moth4017 said in How to log triggering of endstop microswitches:

                    @Triet im not sure you can trap a false trigger in the object modlel there are the following

                    I even found an "Endstops Monitor Plugin", so that now I can see the same thing unter "Settings->Machine-Specific":

                    5bdd1cc2-d288-4c9a-bcc1-fe898502b5f0-image.png

                    I don't see how to configure a possibility to log anything either.

                    droftartsundefined 1 Reply Last reply Reply Quote 0
                    • droftartsundefined
                      droftarts administrators @Triet
                      last edited by

                      @Triet The endstop plugin just shows the state from the Object Model. It's also not being updated for RRF 3.5, as the endstop status is shown on the axis legend in DWC now.

                      Another way to log disconnections is to use triggers. Endstops are only active during homing, the rest of the time they can act as limit switch triggers. Set up with M581:

                      M581 T3 X Y S1  ; invoke trigger 3 when the X or Y endstop switch is triggered
                      

                      Set up a file called sys/trigger3.g that appends a message to a file (see https://docs.duet3d.com/en/User_manual/Reference/Gcode_meta_commands#echo-command😞

                      ; trigger3.g
                      echo >>"endstop_error.txt" "Endstop triggered at {state.time}"
                      

                      Make sure sys/endstop_error.txt exists before this starts. Or add some conditional gcode to check if it's there, and either create it or append to it. Note: the above is not tested, and may contain errors!

                      Ian

                      Bed-slinger - Mini5+ WiFi/1LC | RRP Fisher v1 - D2 WiFi | Polargraph - D2 WiFi | TronXY X5S - 6HC/Roto | CNC router - 6HC | Tractus3D T1250 - D2 Eth

                      Trietundefined 1 Reply Last reply Reply Quote 1
                      • Trietundefined
                        Triet @droftarts
                        last edited by Triet

                        @droftarts
                        You have put a lot of valuable information in a couple of lines - thanks!

                        Edit:
                        I changed the trigger3.g file this way:

                        echo >>"endstop_error.txt" "Endstop triggered at ", {state.time}

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