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

    Debug for endstop activation possible?

    Scheduled Pinned Locked Moved Unsolved
    Tuning and tweaking
    3
    9
    269
    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.
    • gnydickundefined
      gnydick
      last edited by

      I'd like to output a message to the debug stream when endstops are hit, but I can't seem to find anyplace that happens. I have all of the debugging enabled, but nothing outputs when the endstop is hit.

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

        If it doesn't currently do that, maybe you can explain what you're trying to accomplish, maybe there is another way.

        Z-Bot CoreXY Build | Thingiverse Profile

        gnydickundefined 1 Reply Last reply Reply Quote 0
        • gnydickundefined
          gnydick @Phaedrux
          last edited by

          @Phaedrux I have a sensor/switch that triggers for only 20 microseconds. There is no way to verify it's getting tripped. The DWC won't show it and a volt meter went respond that quickly. So I just want to see if the firmware sees it tripping.

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

            Well I suppose if you set it up as a trigger you could see if it will trigger the macro you create.

            Z-Bot CoreXY Build | Thingiverse Profile

            gnydickundefined 1 Reply Last reply Reply Quote 0
            • gnydickundefined
              gnydick @Phaedrux
              last edited by

              @Phaedrux that's why I want the debug output. I don't know if it's failing to trigger because it's so fast and the firmware can't catch it or if the sensor isn't working. Only way to know for sure is from the horse's mouth.

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

                @gnydick said in Debug for endstop activation possible?:

                @Phaedrux I have a sensor/switch that triggers for only 20 microseconds

                Existing main board firmware almost certainly won't see a pulse as short as 20us. Duet 3 expansion and tool board firmware might see it, if it gets through the debounce filter.

                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

                gnydickundefined 2 Replies Last reply Reply Quote 0
                • gnydickundefined
                  gnydick @dc42
                  last edited by

                  @dc42, thanks. While we're in the topic though, can you have a crack at the original question? I'm happy if you just point me to the source code that enumerates debug events of you want.

                  1 Reply Last reply Reply Quote 0
                  • gnydickundefined
                    gnydick @dc42
                    last edited by

                    @dc42 what about 20 milli-sec?

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

                      In current main board firmware, the endstops are polled in function CheckEndstops which is in class DDA. So you could put a call to debugPrintf in there.

                      A 20ms pulse will be long enough provided that the step rate is at least 1 step per 20ms, so 50 steps/sec, which should always be the case when homing. For example, 10mm/sec @ 80 steps/mm would be 800 steps/sec.

                      Expansion board firmware uses interrupt-driven endstop inputs. Future main board firmware will too.

                      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