Main Program And Subroutine - Adtech ADTECH9 Series Programming Manual

Table of Contents

Advertisement

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.
Subroutine format:
OXXXX
............ ;
............ ; Subroutine content
............ ;
M99
Example: X100.0 Y100.0 M99;
Note:
ADTECH9 Series CNC Programming Manual
Fig. 1.3.2 Main Program and Subroutine
; Subroutine name
; Subroutine ends, and returns to previous program

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ADTECH9 Series and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

This manual is also suitable for:

Cnc seriesCnc9640Cnc9650Cnc9960Cnc9810Cnc9810e

Table of Contents