Programming instructions

6-2
Auxiliary Functions (S, M, Q) NC Programming 17VRS
DOK-MTC200-NC**PRO*V17-ANW1-EN-P
All M-functions with the exception of the spindle control commands Mx03,
Mx04, Mx05, Mx13, Mx14, the program control commands Mx00, Mx01,
Mx02, Mx30, and the block-active M-function Mx19 (x = 1...3) can be
used as desired by the machine builder since they do not trigger any in-
ternal functions in the controller.
In a given NC-block, only one M-function can be programmed from
each function group.
M-functions from M000 to M399 can be programmed with the CNC.
No more than four M-functions can be programmed in a single NC-
block.
The M-functions overwrite one another.
Note:
If more than one gear range is activated in the axis parame-
ters, the M-functions will no longer be available for general
use.
Program Control Commands
M000 allows a defined NC-program stop to be performed—for example,
to inspect a tool. After the tool has been checked, the program can be
continued by pressing the start key.
In all program-controlled modes M000, like the HLT command, produces
a program stop in the NC. However, in contrast to HLT, and the end of the
motion, the NC sends the M000 auxiliary function to the SPS.
M001 acts like M000 when the interface signal conditional stop
(PxxC.M01) is set by means of a machine control key. The NC evaluates
the interface signal conditional stop after acknowledging the auxiliary
function.
M002/M030 act like the RET command. In addition, the NC sends the
currently programmed auxiliary function to the SPS. Both auxiliary func-
tions communicate the end of program to the SPS by resetting the NC-
program to the start of the program. The NC thus establishes the power-
on state. After M002 or M030 are performed, all subroutine levels and all
reverse vectors are cleared and the NC controller is in the initial state in
the main program level.
Spindle Control Commands
The spindle is turned on or off using the spindle control commands M003,
M004, M005, M013, M014. The first digit in the M-functions is evaluated
as the spindle index number. If the spindle index is 0 or 1 (M003 or
M103), the M-function is applied to the first spindle; if the spindle index is
2 (M203), the M-function is applied to the second spindle, if 3 (M303) to
the third spindle.
The spindle control commands Mx03, Mx04, Mx13 and Mx14 take
effect as soon as an axis move is programmed in the NC-block. How-
ever, they are not output to the SPS until the motion command is
completed.
Activate spindle rotation in clockwise direction.
Activate spindle rotation in counterclockwise direction.
Shut off spindle and shut off supply of coolant/lubricant.
Turn on spindle rotation in the clockwise direction and turn on coolant/
lubricant supply if the required switching functions are defined in the SPS
program.
Programmed stop
(unconditional)
M000
Conditional Stop
M001
End of NC program
M002
/
M030
Mx03 Spindle in clockwise
direction
Mx04 Spindle in
counterclockwise direction
Mx05 Spindle stop
Mx13 Spindle in clockwise
direction
and coolant/lubricant ON