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

    Timing/delay functions while setting a pin high/low

    Scheduled Pinned Locked Moved
    Gcode meta commands
    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,

      I am trying to add multicolor/multimaterial to my printer via the 3DChameleon add on here:
      https://www.3dchameleon.com/

      It works by using the printer hotend to physically bump the provided end stop switch for a set amount of time to perform loading/unloading functions.

      So instead of using the actual printer hotend to bump the provided switch, I though I can use my duet 6hc main board to directly simulate the switch output by toggling a pin high/low. The problem is I need relatively specific timings and I don't know how to do that.

      For example, I need to: set pin 1 high for 3 seconds, then set it low for 2 seconds, then set it high for 4 seconds, then set it low---how do I do that?

      I was looking at the Gcode meta commands documentation but I can't find much in the way of timings/delay, can you guys help.

      Thanks in advance.

      Kind regards,

      Gordon

      jay_s_ukundefined 1 Reply Last reply Reply Quote 0
      • jay_s_ukundefined
        jay_s_uk @Gordon Lin
        last edited by

        @Gordon-Lin G4 would be what you want to add for a delay. https://docs.duet3d.com/en/User_manual/Reference/Gcodes

        Owns various duet boards and is the main wiki maintainer for the Teamgloomy LPC/STM32 port of RRF. Assume I'm running whatever the latest beta/stable build is

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

          @jay_s_uk

          That will do the trick, thank you 🙂

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