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

    Using IO port on duet 6HC to simulate limit switch

    Scheduled Pinned Locked Moved Solved
    Duet Hardware and wiring
    2
    3
    116
    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.
    • Gordon Linundefined
      Gordon Lin
      last edited by

      Guys, my printer uses a 3Dchameleon filament system here to achieve multi-color prints:
      https://www.3dchameleon.com/

      It works by using the hot end to physically bump a limit switch (and hold it down for a set amount of time) to tell the external controller what to do. I have always wanted to bypass physically bumping the limit switch by directly connecting my 6HC to the external controller, and use the 6HC to output the limit switch signal.

      So for the sake of this example:
      io7.out on 6HC connected to external controller
      GND on 6HC connected to external controller

      I was reading the documentation and I think I need to somehow use M950 to configure the pin then use M42 to set the pin high/low:

      M950 P0 "io7.out"
      M42 P0 S1

      Is this right? I can never fully understand the examples in the documentation.

      Thanks for your help in advance

      Gordon

      oliofundefined 1 Reply Last reply Reply Quote 0
      • oliofundefined
        oliof @Gordon Lin
        last edited by oliof

        @Gordon-Lin M950 needs to be

        M950 P0 C"io7.out"

        To simulate the lingering at the switch, you would want to use the dwell command like this

        M42 P0 S1   ; enable gpio 
        G4 S1       ; wait one second 
        M42 P0 S0   ; disable gpio
        

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

        Gordon Linundefined 1 Reply Last reply Reply Quote 0
        • Gordon Linundefined
          Gordon Lin @oliof
          last edited by

          @oliof Thank you, this is exactly what I am after.

          Kind regards,

          Gordon

          1 Reply Last reply Reply Quote 0
          • droftartsundefined droftarts marked this topic as a question
          • droftartsundefined droftarts has marked this topic as solved
          • First post
            Last post
          Unless otherwise noted, all forum content is licensed under CC-BY-SA