Using external switch to run gcode/Macros



  • Hi All

    Using the duet at the moment and all is good, running dual z, filament sensor (magnetic), dual filament motors and more, all good so far, what we need to do is the following and have no idea how at this stage, so I thought id ask you guys. Any help / Direction would be great.

    Need:
    Use and external simple button to trigger a gcode/macro event. (yes we can use a screen but in our case we are not, and can't)

    Example use:
    Press a button to unload the filament from the machine, IE with a input trigger (button press) run a pre-configured macro already created.

    I know there are limited inputs so I'm hoping there are some great operators out there that can help.

    Thanks heaps in advance for any help you can give.

    D



  • @dnksystems You can that. Connect the switch to a spare end stop input then use M581 to run a macro when the switch is pressed.



  • Thanks for that, working on this now.

    Great work
    D



  • @dnksystems To expand on what I said, if you have Duet generation 3, then none of the io ports are pre-defined so you can use pretty much any io port, rather than an end stop input. I have a DC UPS which has various sets of NO switch contacts which trigger on various events. So I connect those to my duet which runs various macros which initiate actions in the event of interrupted mains supply and so forth.


Log in to reply