2.2 Part Program 39
Table 2.2 (continued)
(iii) Milling cycle
Pocket milling, Slot milling. Define a series
of commands to machine profiles that are
frequently machined during pocket milling and
slotting as milling cycles.
(iv) Touch Probe cycle
This command enables the modification of a program
via on-machine inspection before or after machining.
This enables compensation of finishing with
inspection of the machining accuracy.
It is possible to edit the description by inserting words in parentheses within a
block, as below.
N20 G01X0Y0 (MOVE TO ZERO POINT);
6
comment
The description comment has no influence on the execution of a part program. Be-
cause the description can be shown on the display of the CNC system together with
the block during editing or executing a part program, it is very useful for managing
part programs.
The end of a part program is signalled by the command M02 or M03. By inserting
M02 or M03 at the end of a part program, all modal values are initialized and reset.
Since the commands M02 and M03 are executed last, they can be located anywhere
within the last block.
2.2.2 Main Programs and Subprograms
2.2.2.1 Main program
A part program is classified into a main program and subprograms. Typically, the
CNC system executes a main program. If a main program includes the command
that is used for calling subprograms, the CNC system executes the subprogram indi-
cated. If, during execution of the subprogram, the command for returning to the main
program is called, the main program is then resumed at the block after the command
that called the subprogram, as shown in Fig. 2.3.
2.2.2.2 Subprogram
In the case that there are fixed routine blocks or iterated operation patterns in a part
program, part programming can be made easier if they are stored as a subprogram
in the internal memory of CNC system. It is possible to call the subprogram from a