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

    Execute Macro as Job

    Scheduled Pinned Locked Moved
    General Discussion
    5
    11
    465
    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.
    • Diamondbackundefined
      Diamondback
      last edited by

      Hello,

      is there any way to execute macro code "as" a job?
      I would like to have the additional feature a running job offers (Babystepping, pause/cancel) when running macros like calibration sequences and such.

      Thank you 🙂

      cosmowaveundefined 1 Reply Last reply Reply Quote 0
      • cosmowaveundefined
        cosmowave @Diamondback
        last edited by

        @diamondback I'm not sure if i understand what you mean...
        But when you like to call a macro during a printjob, use M98 to call a macro.

        Mankati FSXT+, DeltaTowerV2, E3D MS/TC

        Diamondbackundefined 1 Reply Last reply Reply Quote 0
        • Diamondbackundefined
          Diamondback @cosmowave
          last edited by

          @cosmowave Currently, when executing a macro via DWC, Duet just executes all the commands as if I typed them by hand in the console. This means that various features that exist during an actual print, do not work (Babystepping, aborting the executed code etc)

          I have a few macros that actually print calibration pieces (like PA calibration) and sometimes this goes wrong or needs some Z adjustment on-the-fly.
          So I would like to have some way to execute a macro file "as if it was an actual printjob", so that DWC actually gives me these "printing-only options".

          1 Reply Last reply Reply Quote 0
          • Phaedruxundefined
            Phaedrux Moderator
            last edited by

            Upload the macro to the "jobs" tab in DWC and then run it as a print.

            Z-Bot CoreXY Build | Thingiverse Profile

            Diamondbackundefined 1 Reply Last reply Reply Quote 0
            • Diamondbackundefined
              Diamondback @Phaedrux
              last edited by

              @phaedrux Hm, while that technically works, I'm afraid it's far from practical in my use case... 😞
              I have a parametric PA test that is fed the relevant data (nozzle and bed temps, toolnumber, etc) via secondary macros that just call the first one with parameters, and then for each filament/tool combination a dedicated macro with the relevant parameters...

              Wasn't there some way to dynamically write files? Can i possibly dynamically create a job file and start that from a macro?

              gloomyandyundefined 1 Reply Last reply Reply Quote 0
              • gloomyandyundefined
                gloomyandy @Diamondback
                last edited by

                @diamondback What happens if you create a job gcode file that simply runs your top level macro (or sequence of macros)?

                Diamondbackundefined 1 Reply Last reply Reply Quote 0
                • Diamondbackundefined
                  Diamondback @gloomyandy
                  last edited by

                  @gloomyandy said in Execute Macro as Job:

                  @diamondback What happens if you create a job gcode file that simply runs your top level macro (or sequence of macros)?

                  That would probably work, but i'm not really overly happy with having to start my stuff from the jobs tab, so far I've treated all the files there as temporary stuff basically, so all logic is in /sys and /macros while the job files are just the printed parts...

                  I was hoping there was some "easy-enough" way to just "set" the printer state from within a macro, but seems like this doesn't exist (yet?)
                  @dc42 is it possible to add something like this?

                  cosmowaveundefined 1 Reply Last reply Reply Quote 0
                  • cosmowaveundefined
                    cosmowave @Diamondback
                    last edited by

                    @diamondback I think, i don't understand your problem.
                    You can write a macro which is doing what you want and start it from the DWC macro tab or touchscreen.
                    Or you can set a "user defined" button in DWC with the plugIn BtnCmd...

                    IMO this should cover all your needs?!

                    Mankati FSXT+, DeltaTowerV2, E3D MS/TC

                    Diamondbackundefined 1 Reply Last reply Reply Quote 0
                    • Diamondbackundefined
                      Diamondback @cosmowave
                      last edited by

                      @cosmowave said in Execute Macro as Job:

                      @diamondback I think, i don't understand your problem.
                      You can write a macro which is doing what you want and start it from the DWC macro tab or touchscreen.
                      Or you can set a "user defined" button in DWC with the plugIn BtnCmd...

                      IMO this should cover all your needs?!

                      The problem is that DWC/RRF has a specific "mode" it enters when printing a job vs merely executing a macro. Try executing a lengthy macro, you will see that you can't abort that via regular means for example (other than emergency stop/cutting power).

                      Some of my macros would greatly benefit from the ability to abort them mid execution or use the regular babystepping controls.

                      zaptaundefined 1 Reply Last reply Reply Quote 0
                      • zaptaundefined
                        zapta @Diamondback
                        last edited by zapta

                        @diamondback said in Execute Macro as Job:

                        The problem is that DWC/RRF has a specific "mode" it enters when printing a job vs merely executing a macro.

                        I wonder what is the reason for the different modes rather than just executing gcode files, regardless of their origin directory.

                        1 Reply Last reply Reply Quote 0
                        • Phaedruxundefined
                          Phaedrux Moderator
                          last edited by

                          https://duet3d.dozuki.com/Wiki/Gcode?revisionid=HEAD#Section_M32_Select_file_and_start_SD_print

                          M32 perhaps?

                          Z-Bot CoreXY Build | Thingiverse Profile

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