G-Code from within Macro apparently not executed



  • 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!



  • @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.



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


 

Looks like your connection to Duet3D was lost, please wait while we try to reconnect.