
PROGRAMMING12. AUXILIARY FUNCTION
B–64154EN/01
114
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 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 3404 (M02) or bit 4 of parameter 3404 (M30) can be
used to disable M02 or M30 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 13.3 for details.
If punching (excluding nibbling) is executed in a block between M08; and
M09; it is executed when the preset time by parameter (No. 16032) has
passed after completion of positioning, and machining proceeds to the
next block when the preset time by parameter (No. 16033) has passed after
receiving the punch finish signal from the machine side. (Other M codes
may be used for these functions depending upon the machine tool
builders.)
The movement amounts of the X and Y axes are not added to the absolute
coordinate value in a block between by M10; and M11;. No punching is
executed, even if punching is specified in the block.
Used to reposition a workpiece. (Other M codes may be used for these
functions, depending upon machine tool builders.)
12.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 M08, M09
(Forming mode and
forming mode cancel)
D M10, M11
(Workpiece clamp and
workpiece unclamp)