Local subroutines (Call LL <string>) <string>)
A local subroutines is called by
LL <string> (Caution: Blank character between "LL" and <string> is mandatory). |
<string> | Name of local subroutine without quotation marks, maximum 83 characters |
Local subroutines (LSUB) together with the main program are located in a common data file which must state all the subroutines before the actual main program.
It should be noted that local subroutines can only be called from the main program in the same data file.
Local subroutines begin with "%L" and a program designation. Between "L" and the program designation, there must be a minimum of one separator.
The end of the subroutine is marked by the functions M17 or M29. A program abort is also possible with M02 or M30. A warning is then issued.
If M17 or M29 is missing, the subroutine is ended by "%” (first character of the following main program of a further subroutine).
Programing Example
Local subroutines (Call LL <string>)
Structure of a data file consisting of the NC main program and local subroutines:
%L UP1 (1st local subroutine)
N1 .....
N2 .....
N9 M17 (M17 can also be left out)
%L UP2 (2nd local subroutine)
N11 .....
N12 .....
N19 M29 (M29 can also be left out)
%MAIN (main program)
N100 .....
N105 .....
N200 LL UP1 (Call 1st LSUB)
.
N250 LL UP2 (Call 2nd LSUB)
.
N300 M30 (Main program end)
No NC commands are permitted before the definition of a program. This is an exception to the rule that the sequence in the NC block has no significance for program execution (see section NC-Satzaufbau).