
12. PROGRAM CONFIGURATION
12.1 Main Program and Subprogram
12. PROGRAM CONFIGURATION
12.1 Main Program and Subprogram
(1)
I
(2)
Main program
A program is divided into a main program and subprogram. Normally, the CNC
operates according to the main program, but when a command calling a
subprogram is encountered in the main program, control. is passed to the
subprogram. When a command indicating to return to the main program is
encountered in the subprogram, control is returned to the main program.
Main program
Subprogram
u Follow the information
in the subproblem
Information n
Information n + 1
Information 1'
information 2’
I
I
I
I
I
I
Return to main program
A total of 63 main programs and subprograms may be stored in
memory, and the CNC uses one of these main programs to move
machine tool.
Refer to II 9 for how to register programs.
Subprograms
When a program contains certain fixed sequences or frequently
the CNC
the CNC
repeated
patterns, these sequences or patterns may be entered into memory as a
subprogram to simplify programming.
The subprogram can be called in main program. A subprogram can call another
subprogram.
When the main program calls a subprogram, it is regarded as a one loop
subprogram call. Thus, four loop subprogram call can be executed as shown
below.
l-38