End of job

From the "classic” interpretation of a CNC program, M30 terminates the running program and "stops" the CNC channel.

When the Job Manager is used, M30 not only ends the CNC program in the commanded channel but also sends an MC_DONE to the commanding job or to the client, if available. The client then uses the message to manage its jobs internally. If there is another job in the client queue, it is automatically activated (message MC_ACTIVATED to the client) and the program described in the job is started.

On the other hand, if a program is terminated in the commanding channel with M30, the program identified by the next waiting job is started. However, the job belonging to the program containing this M30 is only terminated when all commanded agent jobs terminate by themselves. If this is the case, an MC_DONE is sent to the client, i.e. the PLC waiting for the MCV_GrpReadJobAck block. Since it can be assumed that commanded agent jobs have not yet been terminated when the next job is started, the result is that several jobs are active.

If programs with different agents are commanded consecutively in a client, it is possible that jobs that were started "later" in the sequence are completed "before" the jobs that were commanded previously.

The figure below shows the relationship between M30 and MC_DONE by means of a job "J1" and its sub-jobs "J1.1" and "J1.2".
If "J1.1" and "J1.2" are terminated with M30, they send an MC_DONE to the client. If the program of "J1" itself was terminated with M30 and all commanded jobs also have the MC_DONE status, an MC_DONE can be sent for "J1". All other jobs and their associated programs are not yet terminated since the corresponding MC_DONE is missing.

End of job messages due to M30 relating to client and agent
End of job messages due to M30 relating to client and agent