Extension of M291/M292



  • With the ever expanding range of object model options and functionality brought about with conditional G Code, it would be handy at times to offer the user a third option (other than OK or Cancel) so that iteration through and array can be carried out.
    For example while playing with job object cancelling functionality, I was able to iterate through the objects and select OK to cancel them in the print, but hitting the Cancel button in the dialog exits the macro, rather than that iteration of the loop.
    Best I could do was skip already cancelled objects, but there's no way to cancel say object 4 of 5 only.

    I realize of course that this particular example will be made redundant when the functionality is added to the DWC.

    echo "started: " ^ #job.build.objects ^ " objects found"
    while {iterations  < (#job.build.objects)}
    	if job.build.objects[iterations].cancelled
    		continue
    	echo "check object " ^ iterations + 1
    	M291 P{job.build.objects[iterations].name} R"Delete?" S3
    	M486 P{iterations}
    	echo "Cancelled object " ^ {job.build.objects[iterations].name} 
    	G4 S1
    echo "Finished"
    

  • administrators

    Good idea! I've added it to the wish list for the 3.02 release.



  • cool can't wait for it as i wanted to use the conditonnal meta command for my cnc gcode, as i have multiple operations, if one fails i don't want to redo everything but only the one where i had to stop or pause.

    So with this i would be able to add a M291 at the beginning of each step to ask if i want to bypass it (in my mind i will use the timer and S1 to 10 or 15 seconds this way if i don't want to bypass it will continue.

    i tried and for now result with m291 is always 0



  • Has this been implemented? If so, are there any examples? Thanks


Log in to reply