
11. MISCELLANEOUS FUNCTION
I I .I Miscellaneous Function (M Function)
11 l MISCELLANEOUS FUNCTION
When a move command and M codes are specified in the same block, the commands
are executed in one of the following two ways:
(i) Simultaneous execution of the move command and M function commands.
(ii) Executing M function commands upon completion of move command execution.
(Example) Nl G91 GOlX50.0
Y -5.0 M05; (Spindle stop)
Move command and spindle
J
stop command are started
Start
at the same time.
point
\
The spindie stops at the end
of move command execution
point
In case of i)
In case of ii)
The selection of either sequence depends on the machine tool builder’s specification.
Refer to the manual issued by the machine tool builder for details.
11.1 Miscellaneous Function (M Function)
When a 8-digit figure is specified following address M, a binary code signal and a
strobe signal are transmitted.
These signals are used for ON/OFF control of a
machine function. One M code can be specified in one block. Selection of M codes
for functions varies with the machine tool builder.
The following M codes indicate special meaning.
(1)
0
i
(ii)
(iii)
(2)
(3)
M02, M30: End of program
This indicates the end of the main program and is necessary for registration of
NC commands from tape to memory.
Cycle operation is stopped and the NC unit is reset. (This differs with the
machine tool builder.)
The NC tape is returned to the beginning of the program.
(In case of M02, NC tape return to the beginning of the program is set or not
set by parameter M02NR (No. 34046).
MOO: Program stop
Cycle operation is stopped after a block containing MOO is executed. When the
program is stopped, all existing modal information remains unchanged as in
single block operation.
The cycle operation can be restarted by actuating the
CNC. (This differs with the machine tool builder.)
MOl: Optional stop
Similarly to MOO, cycle operation is stopped after a block containing MO1 is
executed. This code is only effective when the Optional stop switch on the
machine control panel has been pressed.
I-36