M291 in start.g not blocking
-
Hiya - hope everyone is doing well. I have a question about the use of the M291 command. I have placed it within my start.g code as a failsafe in case a job file is loaded using Upload & Start at the top of the web interface, and pre-conditions of zeroing the cutting tool or securing material not met. This is for a CNC machine I am setting up for a school environment and is intended as part of a basic workflow to correspond with a handout.
M291 P"Job about to start. Cancel job if tool not manually zeroed or material secured" R"Warning" S3 ; failsafe
I am finding that cancelling the message still results in the uploaded gcode being run, spindle turning on and axis moving. Is there a way of cancelling the message which results in pausing / cancelling the job loaded?
Many thanks, Savvas
-
An update - I can place the M291 command in the post processor so it is generated in the gcode, and that seems to work but I'd prefer to have this in the start.g file for ease of editing.
-
This seems like a better case to use a conditional check either for an object model state or a variable that gets set.