
B-63944EN/02 PROGRAMMING 11.AUXILIARY FUNCTION
- 255 -
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.
Depending on the setting of bit 7 (M3B) of parameter No. 3404, up to
three M codes can be specified.
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.6071 to 6079), or called custom
macro (Parameter No.6080 to 6089). Refer to the machine tool
builder's instruction manual for details.
Explanation
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.)
After a block specifying the end of the program is executed, control
returns to the start of the program.
Parameter M02 (No. 3404#5) or parameter M30 (No. 3404#4) can be
used to disable M02, M30 from returning control to the start of the
program.
- M00 (Program stop)
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.)
- 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 subprogram)
This code is used to call a subprogram. The code and strobe signals
are not sent. See the subprogram II-13.3 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 section II-13.3 for
details.