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

    Wait for io pin

    Scheduled Pinned Locked Moved
    Duet Hardware and wiring
    wait io pin g code extension
    4
    6
    972
    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.
    • danny_v1undefined
      danny_v1
      last edited by

      Hi,

      I want to rebuild my printer as a dual parking extruder and for changing the Tools i want to use some electro magnets ans some kind of switches. In the tool change skript i want to wait until the correct Switch is triggered for example. On a pin on the extension header. I hope someone can help me wich g code i have to use to wait for an io pin is triggered. (I want to drive the axis to the tool set an io pin which switches the magnet ans wait for the pin until the tool is conected exactly.)

      Thank you for your help!

      danny_v1

      deckingmanundefined 1 Reply Last reply Reply Quote 0
      • deckingmanundefined
        deckingman @danny_v1
        last edited by

        @danny_v1 One way of doing it would be to connect your switches to spare end stops then use M581 to run a macro when the input level changes. Take a look here https://duet3d.dozuki.com/Wiki/GCode#Section_M581_Configure_external_trigger

        Ian
        https://somei3deas.wordpress.com/
        https://www.youtube.com/@deckingman

        1 Reply Last reply Reply Quote 0
        • danny_v1undefined
          danny_v1
          last edited by

          Ok thank you. This is one possibility. Can i use for this also the E_Stops on the expansion header?

          How would the g code lock like if I want to use E_Stop_5?

          The sequence for change the extruders has to be like this: go to parking position of the active extruder activate the magnet of the parking position-> switch of the magnet of the x-axis -> go to the other extruder -> switch on the magnet of the x-axis -> switch off magnet of the parking position.

          The switching of the magnets should be done by an arduino nano. The change is done signal should be send to the io pin of the duet.

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

            Can you temporarily map an additional axis to the motor, then connect your switch as the endstop switch for that axis?

            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
            • danny_v1undefined
              danny_v1
              last edited by

              sorry I was some time not here.
              @dc42 how should it work exactly (what I have to do)???

              Thank you for your help!

              T3P3Tonyundefined 1 Reply Last reply Reply Quote 0
              • T3P3Tonyundefined
                T3P3Tony administrators @danny_v1
                last edited by

                @danny_v1 have you looked at the functionality provided:
                https://duet3d.dozuki.com/Wiki/GCode#Section_M581_Configure_external_trigger

                Any trigger number # greater then 1 causes the macro file sys/trigger#.g to be executed.

                so you can setup a macro to do what you want and then use a trigger to call that macro.

                www.duet3d.com

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