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

    Macro within a macro

    Scheduled Pinned Locked Moved
    My Duet controlled machine
    2
    4
    193
    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.
    • PaulHewundefined
      PaulHew
      last edited by

      I have looked in the Wiki's and anywhere else I can think of to find an answer to my question, but no success!
      I am running the latest RRF3 on a Duet2 Ethernet with Duex5

      If I am running a macro and call another macro from it, what happens to the original macro, does it continue or wait for the called macro to finish before continuing?

      For instance.
      Macro1 - does a bed leveling procedure.
      Macro2 - fades the RGB lights up and down in red. (Lots of copy and paste!)

      ;Level bed Macro
      M98 "Macro2.g" ; start fade the lights to indicate something is happening.
      ;
      do ; carry on with my leveling procedure
      my
      leveling
      commands
      here
      etc
      ;Stop Macro2.g somehow!!
      

      If it does just 'call' Macro2 and continue, can I stop Macro2 when Macro1 is finished?

      Regards,
      Paul

      RailCore II - Duet Mini + 1LC, Voron V0.1 - Duet Mini
      Voron 2.4 disassembled..... Waiting for the RailCore Mini....

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

        The original macro will be paused until the one it called has completed.

        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

        PaulHewundefined 1 Reply Last reply Reply Quote 0
        • PaulHewundefined
          PaulHew @dc42
          last edited by

          @dc42 That was quick David, thank you.
          Will the Duet2 ever be able to run a 'called / sub' process independantly?
          Out of interest, can the Duet3?

          So the best I can do is turn the red LEDs on full, and off at the end. 😞

          Thanks again.

          Paul

          RailCore II - Duet Mini + 1LC, Voron V0.1 - Duet Mini
          Voron 2.4 disassembled..... Waiting for the RailCore Mini....

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

            @PaulHew said in Macro within a macro:

            @dc42 That was quick David, thank you.
            Will the Duet2 ever be able to run a 'called / sub' process independantly?
            Out of interest, can the Duet3?

            The only independent subprocess on Duet 2 or Duet 3 in standalone mode is the daemon.g file. You could use that to control your LEDs. On Duet 3 with attached SBC, many things are possible using plugins.

            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
            • First post
              Last post
            Unless otherwise noted, all forum content is licensed under CC-BY-SA