11.AUXILIARY FUNCTION PROGRAMMING B-63324EN/03
- 258 -
11.1 AUXILIARY FUNCTION (M FUNCTION)
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. In some cases,
however, up to three M codes can be specified for some types of
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, M99,M198 or called subprogram(Parameter
No.7071 to 7079), called custom macro (Parameter No.7080 to 7089),
or controlled interrupt custom macro on/off (M96, M97, parameter
No.7033 or 7034). Refer to the machine tool builder’s instruction
manual for details.
The following M codes have special meanings.
- M02,M03 (End of program)
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.
- M00 (Program stop)
Automatic operation is stopped after a block containing M00 is
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.
- M01 (Optional stop)
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.
- M98 (Calling of sub-program)
This code is used to call a subprogram. The code and strobe signals are
not sent. See the subprogram II-12.2 for details.
- M99 (End of subprogram)
This code indicates the end of a subprogram.
M99 execution returns control to the main program. The code and
strobe signals are not sent. See the subprogram II-12.2 for details.
- M198 (Calling a subprogram)
This code is used to call a subprogram of a file in the external
input/output function. See the description of the subprogram call
function (II-12.2) for details.