Using multiple M98 or M32 commands in a macro



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


  • administrators

    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.


 

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