808D ADVANCED Page 83 Programming and Operating — Turning
Additional
Information
Part 2
s
SEQUENCE
M/H
Function
Sub
program
Frequently used machining sequences, e.g. certain contour shapes, are
stored in subprograms. These subprograms are called at the appropriate
locations in the main program and then executed.
The structure of a subprogram is identical to that of the main program, but
a subprogram contains M17 - end of program in the last block of the pro-
gram sequence. This means a return to the program level where the sub-
program was called.
The subprogram should be given a unique name enabling it to be selected
from several subprograms. When you create the program, the program
name may be freely selected.
However, the following rule should be observed:
The name can contain letters, numbers and underscores and should be
between 2 and 8 characters long.
Example: LRAHMEN7
The M function initiates switching operations, such as "Coolant ON/OFF".
Various M functions have already been assigned a fixed functionality by
the CNC manufacturer. The M functions not yet assigned are reserved for
free use of the machine tool manufacturer.
With H functions, the meaning of the values of a specific H function is
defined by the machine tool manufacturer.
M codes and H functions created by the OEM should be backed up by the
machine tool manufacturer.
Specified M
Function
Explanation Specified M
function
Explanation
M0 Stop program M7 / M8 Coolant on
M1 Stop program with
conditions
M9 Coolant off
M2 End program M10 / M11 Chuck close / re-
lease
M30 End program and
back to the beginning
M20 / M21 Tailstock release /
close
M17 End subprogram M40 Select gear stage
automatically
M3 / M4 / M5 Spindle CW/CCW/
Stop
M41~M45 Change spindle gear