1. General
20
-
Format of
end
end
end
end of
of
of
of program
program
program
program
The last block should contain M02 or M03 to indicate the end of program.
-
Format of
Comments
Comments
Comments
Comments
All information after the “;” is regarded as comments.
All information between “( )” is regarded as comments.
1.8.2
1.8.2
1.8.2
1.8.2 Main
Main
Main
Main Program
Program
Program
Program and
and
and
and Subprogram
Subprogram
Subprogram
Subprogram
There are two type of program: main program and subprogram. The CNC operates
according to the main program. When a execution command of subprogram is at the
execution line of the main program, the subprogram is called. When the execution of
subprogram is finished, the system returns control to the main program.
Instruction 1
Instruction 2
Instruction n
Instruction n+1
Follow the direction
ofthe subprogram
Instruction 1
Instruction 2
Return to the main program
Main program
Subprogram
Figure 1.27 Main program and subprogram
Note:
Note:
Note:
Note:
Main program and its subprogram must be written in a same file with a different program
codes.
Summary of Contents for HNC-18iT
Page 27: ...2 Preparatory Function 23 G59...