This often can be set by choice in the controller as The M code function executed after the move command or The M code executed at the same time as the move command.
Either way the it is common for the M code to register that it is done by waiting for a finish signal from the logic processor, and originating from the controlled action, For e.g. if an M code is not required to wait for any finish, like turning on the coolant, then a finish signal is returned automatically.
The next block of code is not processed until the FIN signal is received.
Either way, a move command should not be stopped or held up, once started, by an M code.
I do alot of Galil programming in native language and use methods that download whole programs or segments, so the program run time is not really affected by the host PC.
The one drawback as far as I can see with many of the existing programs that mate with Galil, is the use of downloading code, one instruction at a time.
This appears to be the bottle-neck to speed.
A modern off the shelf package uses two processors, or muti-tasking processes, one for the CNC and the other taking care of the Machine functions, M codes etc.
Also, feed-rate overide should take effect by perception, immediatly, and the Fin signal also applies to S & T codes.
Al.
CNC, Mechatronics Integration and Custom Machine Design
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.