
PROGRAMMING
B–61404E/08
11. AUXILIARY FUNCTION
116
When a three–digid 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. In some cases,
however, up to three M codes can be specified for some types of machine
tools.
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
specified by M98 or M99. 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 019 (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 13.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.
This code is used to call a file on the floppy cassette as a subprogram.
NOTE
The block following M00, M01, M02 and M30, is not read
into the input buffer register, if present. Similarly, two M
codes which do not buffer can be set by parameters (Nos.
111 to 112). Refer to the machine tool builder’s instruction
manual for these M codes.
11.1
AUXILIARY
FUNCTION
(M FUNCTION)
Explanations
D M02,M03
(End of program)
D M00
(Program stop)
D M01
(Optional stop)
D M98
(Calling of
sub-program)
D M99
(End of subprogram)
D M198
(subprogram calling)