
PROGRAMMING
11. AUXILIARY FUNCTION
B–63444EN/01
84
When a numeral is specified following address M, code signal and a
strobe signal are sent to the machine. The machine uses these signals to
turn on or off its functions.
Usually, only one M code can be specified in one block.
Which M code corresponds to which machine function is determined by
the machine tool builder.
The machine processes all operations specified by M codes except those
(parameter Nos. 6071 to 6079) that call M98 and M99 subprograms and
those (parameter Nos. 6080 to 6089) that call custom macros. Refer to
the machine tool builder’s instruction manual for details.
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 3404 (M02) can be used to disable M02 from returning
control to the start of the program.
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 12.3 for details .
This code indicates the end of a subprogram.
M99 execution returns control to the main program. See the subprogram
section 12.3 for details.
NOTE
The block following M00, M01, M02 and M30, is not read
into the input buffer register, if present. 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.
11.1
AUXILIARY
FUNCTION
(M FUNCTION)
Explanations
D M02,M30
(End of program)
D M00
(Program stop)
D M01
(Optional stop)
D M98
(Calling of
sub-program)
D M99
(End of subprogram)