9 Programming: Subprograms and Program Section Repeats
242
9.4 Program as Subprogram
Programming a program section repeat
ú
To mark the beginning, press the LBL SET key and
enter a LABEL NUMBER for the program section you
wish to repeat.
ú
Enter the program section.
Calling a program section repeat
ú
Press the LBL CALL key and enter the label number of
the program section you want to repeat as well as the
number of repeats (with Repeat REP).
9.4 Program as Subprogram
1 The TNC executes the part program up to the block in which
another program is called with CALL PGM.
2 Then the other program is run from beginning to end.
3 The TNC then resumes the first (calling) part program with the
block behind the program call.
Programming notes
■
No labels are needed to call any program as a subprogram.
■
The called program must not contain the miscellaneous functions
M2 or M30.
■
The called program must not contain a program call into the
calling program.
Calling any program as a subprogram
ú To call the program, press the PGM CALL key and
enter the program name of the program you wish to
call.
The program you are calling must be stored on the hard
disk of your TNC.
You need only enter the program name if the program
you want to call is located in the same directory as the
program you are calling it from.
If the called program is not located in the same directory
as the program you are calling it from, you must enter
the complete path, e.g. TNC:\VZW35\ROUGH\PGM1.H
If you want to call an ISO program, enter the file type .I
after the program name.
You can also call a program with Cycle 12 PGM CALL.
0 BEGIN PGM A
CALL PGM B
END PGM A
0 BEGIN PGM B
END PGM B
LKAP9.PM6 30.06.2006, 07:04242
www.EngineeringBooksPdf.com