12. AUXILIARY FUNCTION
When address M followed by a number is specified, a code signal and
strobe signal are transmitted. These signals are used for turning on/off the
power to the machine.
In general, only one M code is valid in a block but up to three M codes
can be specified in a block (although some machines may not allow that).
The correspondence between M codes and functions is up to the machine
All M codes are processed in the machine except for M98, M99,M198,
M codes for calling a subprogram (parameters Nos. 6071 to 6079), and
M codes for calling a custom macro (parameters Nos. 6080 to 6089).
Refer to the appropriate manual issued by the machine tool builder.
The following M codes have special meanings.
This indicates the end of the main program
Automatic operation is stopped and the CNC unit is reset. This differs
with the machine tool builder. After a block specifying the end of the
program is executed,control returns to the start of the program. Bit 5 of
parameter No.3404 (M02) or bit 4 of parameter No.3404 (M03)can be
used to disable M02 or M03 from returning control to the start of the
Automatic operation is stopped after a block containing M00 is executed.
When the program is stopped, all existing modal information remains
unchanged. The automatic operation can be restarted by actuating the
cycle operation. This differs with the machine tool builder.
Similarly to M00, automatic operation is stopped after a block containing
M01 is executed. This code is only effective when the Optional Stop
switch on the machine operator’s panel has been pressed.
This code is used to call a subprogram. The code and strobe signals are
not sent. See the subprogram section II–13.3 for details .
This code indicates the end of a subprogram.
M99 execution returns control to the main program. No code or strobe
signal is sent. See the subprogram section II–13.3 for details.
A block immediately after an M00, M01, M02, or M03 block
is not buffered. Similarly, ten M codes which do not buffer
can be set by parameters (Nos. 3411 to 3421). Refer to the
machine tool builder’s instruction manual for these M codes.
(End of program)
(Calling of subprogram)
(End of subprogram)