ADTECH9 Series CNC Programming Manual
1.3.2
Main program and subroutine
The processing programs include main programs and subroutines. Generally, NC executes the instructions of
main program; however, NC will turn to execute subroutine when executes a subroutine calling instruction,
and will return to the main program when executes the return instruction in subroutine.
When the processing program needs to run same track for several times, edit this track into the subroutine and
save in the program memory of the machine tool, and this subroutine can be called when this track should be
executed in the program.
When the main program calls a subroutine, this subroutine can call another subroutine, which is called double
nesting. Generally, the machine tool allows up to quadruple subroutine nesting. In calling subroutine
instruction, the subroutine can be repeated for 999 times.
Fig. 1.3.2 Main Program and Subroutine
Subroutine format:
OXXXX ; Subroutine name
………… ;
………… ; Subroutine content
………… ;
M99 ; Subroutine ends, and returns to previous program
Example: X100.0 Y100.0 M99;
Note:
Содержание CNC9640
Страница 1: ...ADTECH9 Series CNC Programming Manual ...
Страница 21: ...ADTECH9 Series CNC Programming Manual Workpiece Coordinate System Diagram ...
Страница 44: ...ADTECH9 Series CNC Programming Manual 2 Occasions that inner corner rotates ...
Страница 45: ...ADTECH9 Series CNC Programming Manual ...
Страница 57: ...ADTECH9 Series CNC Programming Manual G18 plane G19 plane 4 If I J is specified in the segment without motion ...
Страница 62: ...ADTECH9 Series CNC Programming Manual Manual insertion ...
Страница 65: ...ADTECH9 Series CNC Programming Manual Tool radius compensation start and axis Z cut in action ...
Страница 117: ...ADTECH9 Series CNC Programming Manual ...
Страница 118: ...ADTECH9 Series CNC Programming Manual ...
Страница 142: ...ADTECH9 Series CNC Programming Manual ...
Страница 143: ...ADTECH9 Series CNC Programming Manual ...
Страница 144: ...ADTECH9 Series CNC Programming Manual ...