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

    Using multiple M98 or M32 commands in a macro

    Scheduled Pinned Locked Moved
    General Discussion
    2
    2
    514
    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.
    • hendricks026undefined
      hendricks026
      last edited by

      Is it possible to run multiple prints sequentially from a macro? I need to make a bunch of copies of the same part and was thinking I could create 4 different gcode files (Print1.gcode, Print2.gcode, Print3.gcode, and Print4.gcode where each gcode file prints one copy of the part in a different quadrant of my bed. Originally I was thinking at the end of each file I could insert an M32 command to run the next file but it seems like you can't initiate a print from inside of a print.

      Simplistically, I want to be able to hit go on one macro or print and the printer to execute the following:

      run Print1.gcode
      then run Print2.gcode
      then run Print3.gcode
      then run Print4.gcode
      then run Print1.gcode…

      until I either emergency stop the printer or cancel wheatever print is currently running. I realize that setting the printer up to run an infinite loop like this could cause problems (running out of filament or the printer going to print a part in quadrant 1 and crashing on the part already there if I havent removed it yet) but each part takes long enough that I know I'll be able to remove them before the printer gets back to that spot.

      Is it possible to do this using some combination of M98 or M32?

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

        Currently I don't think there is a straightforward way of doing this; but you could concatenate the 4 gcode files together, and make sure there is no M0 command in the end gcode of each file.

        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