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

    M581 external trigger

    Scheduled Pinned Locked Moved
    Firmware wishlist
    m581 trigger
    3
    6
    1.3k
    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.
    • fotomasundefined
      fotomas
      last edited by

      Background: I want more hardware buttons and hence more triggers. I have been experimenting with using end stops in use to trigger macros for homing and jogging the x/y.

      Unfortunately this has the side effect of triggering the macros during homing. This could probably be avoided by disable the triggers before homing and then enable them again. M581 S-1

      The use of conditions in G code (listed in the firmware backlog) could possibly make some or all of below possible without modifying the M581. Also general I/O pins to cause triggers would be really nice 🙂

      Wish #1
      I find it logical to disable triggers on end stops in use while homing, by default or by config.

      And related an option to trigger different trigger files depending on if printing going on or not. As of today the option is always or only when printing.

      Wish #2
      A option "when not printing" M581 C2 ??

      Wish #3
      And lastly, possibility to have several M581 for the same port but with different conditions and logical id/trigger#.g file

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

        @fotomas said in M581 external trigger:

        Background: I want more hardware buttons and hence more triggers. I have been experimenting with using end stops in use to trigger macros for homing and jogging the x/y.
        Unfortunately this has the side effect of triggering the macros during homing. This could probably be avoided by disable the triggers before homing and then enable them again. M581 S-1

        You can do that in the homing files.

        Wish #2
        A option "when not printing" M581 C2 ??

        I can add that. Do you have a particular use case?

        Wish #3

        And lastly, possibility to have several M581 for the same port but with different conditions and logical id/trigger#.g file

        That's already possible.

        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
        • fotomasundefined
          fotomas
          last edited by

          Building a CNC (MPCNC) with a 0.6 board and a Duex4 I have got six end stops to use.

          Use case wish #2 :
          I am not there yet but I imagine jogging the spindle to corner of the stock and zeroing all axis there will be a rather common task.

          Four physical buttons moving to the corner of the stock G1 X / Y, using X / Y end stops.
          One physical button to home Z, using Z end stop.

          None of these is desirable during printing. My end stop micro switches could be triggered by accident during printing. For example leaning over the machine to see or clean with a vacuum cleaner. That is why I would like to block the triggers during printing.

          Of course the DWC and Panel Due could be used but leaning over the machine eyeballing where 0,0 will be reaching for physical buttons would be very nice.

          This also opens up for other usage for the buttons during printing, like babaystepping, pause etc.

          BUT using conditions in G code would be another way to go about it and that modification of the firmware probably opens up to a lot more creative ideas. Assuming the condition IS_PRINTING is implemented.

          Related question
          Is G10 possible on 0.6 board to do a "current (not knowing coordinate in macro) coordinate will from now be X0, Y0", instead of G92 X0 Y0 and risking running past axis max values?

          Wish #3:
          So this is possible ??(I haven't tested)

          M581 X S1 T2 C1 ; Do T2 pressing button
          M581 X S0 T3 C2 ; Do T3 releasing button

          In combination with wish #2, C2
          M581 X S1 T2 C1 ; Do T2 when printing
          M581 X S1 T3 C2 ; Do T3 when NOT printing

          And going all in 🙂 :
          M581 X S0 T2 C1
          M581 X S1 T3 C2
          M581 X S0 T4 C1
          M581 X S1 T5 C2

          dc42undefined hayseed_byteundefined 2 Replies Last reply Reply Quote 0
          • dc42undefined
            dc42 administrators @fotomas
            last edited by

            @fotomas said in M581 external trigger:

            Is G10 possible on 0.6 board to do a "current (not knowing coordinate in macro) coordinate will from now be X0, Y0", instead of G92 X0 Y0 and risking running past axis max values?

            No. The firmware build for legacy Duets is memory-constrained compared to current Duets, so the support for workplace coordinates is disabled in that build. You could enable it if you build the firmware yourself, but you would probably need to make some memory savings elsewhere, for example by reducing the maximum number of drives from the standard value (9).

            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
            • hayseed_byteundefined
              hayseed_byte @fotomas
              last edited by

              @fotomas said in M581 external trigger:

              This also opens up for other usage for the buttons during printing, like babaystepping, pause etc.

              I added hardware buttons to my 3d printer. I posted about it on my blog because I had a hard time finding information on the process at the time and had to just wing it. I added buttons for Pause, Reset, ATX On, Home all, and Disable Steppers. I wanted to add Halt (RRF calls it Emergency Stop) and ATX Off but both of those require confirmation in DWC so I wasn't able to get them to work.

              Anyway, you can see my trigger files and config settings on my aforementioned blog.

              https://www.wildbot3d.com/contol-panel/

              https://wildbot.me/wildbot
              Gcode Definitions for VSCode extension: https://github.com/hayseedbyte/rrf-gcode-definitions

              fotomasundefined 1 Reply Last reply Reply Quote 0
              • fotomasundefined
                fotomas @hayseed_byte
                last edited by

                @hayseed_byte said in M581 external trigger:

                https://www.wildbot3d.com/contol-panel/

                Thank you, interesting info.

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