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

    G-Code from within Macro apparently not executed

    Scheduled Pinned Locked Moved Solved
    Tuning and tweaking
    2
    3
    532
    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.
    • t0biasundefined
      t0bias
      last edited by

      Hi,

      I have a Raspberry Pi with a Pi-Camera in place to provide the Webcam-Stream for the WebControl User Interface.
      The Pi is configured to listen on one of its GPIO-Pins for a rising Edge in order to properly Shutdown before I cut the power. I connected that Pin to the Pin 63 on my Duet WiFi (no Thermocouple in place) and created a Macro with just the following 3 lines:

      M42 P63 S255
      G4 500
      M42 P63 S0

      to keep the Line High for half a Second just to be sure.

      Now upon running the Macro, nothing seems to happen. When I do enter the first Command (M42 P63 S255) in the WebControl "Send Gcode" Field in the Navigation-Bar, everything works flawlessly and the Pi shuts down immediately as it is supposed to.

      Are there certain commands that cannot be used within Macros or did I miss something else here?

      Thanks!

      JoergS5undefined 1 Reply Last reply Reply Quote 0
      • JoergS5undefined
        JoergS5 @t0bias
        last edited by JoergS5

        @t0bias I would try G4 P500, meaning wait 500 ms, according to https://reprap.org/wiki/G-code#G4:_Dwell you need to use P for ms or S for seconds.

        1 Reply Last reply Reply Quote 1
        • t0biasundefined
          t0bias
          last edited by

          Thanks so much, that totally did it! Didn't see that myself.. 🙄

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