
Programming manual
486
CNC 8070
15.
STATEMENTS AND
IN
STRUCTI
O
NS
Pr
ogr
am
m
ing st
at
em
ent
s
(S
OFT
V02.0
X
)
420
15.1.4 Subroutine instructions
A subroutine is a set of blocks that, properly identified, may be called
upon and executed once or several times from any program position.
There are two types of subroutines, local and global.
•
The global subroutine is stored in the CNC memory as an
independent program and may be called upon from any other
program being executed.
•
The local subroutine is defined as part of a program and may only
be called upon from the program that contains it.
Since a subroutine may be called upon from the main program (or a
subroutine) and another subroutine from this one and so on, the CNC
limits the number of these calls to a maximum of 20 nesting levels.
Local subroutine
It must be defined before the body of the program. Several local
subroutines may be defined in the same program.
The beginning of a subroutine is defined by "%L<name>", where
<name> may be up to 14 characters long and consist of uppercase
and lowercase letters as well as numbers (no blank spaces are
allowed).
The end of the subroutine is defined with M17, M29 or #RET.
Global subroutine
It is defined as separate program. The name used to store it in the CNC
will be the name of the subroutine. The name of a global subroutine
does not admit parenthesis because these characters have a special
meaning within the part-program.
As opposed to a program that ends with an M30, a global subroutine
must end with an M17, M29 or #RET.
Define the path of the subroutines
#PATH
Define the location of the subroutines
The
#PATH
instruction may be used to define a predetermined
location for searching global subroutines as follows.
#PATH ["<text>"]
If no path is defined in the subroutine call, the CNC will first look for
the subroutine in the path defined using this instruction.
#PATH ["C:\Cnc8070\Users\Prg\"]
#PATH ["C:\Cnc8070\Users\"]
Summary of Contents for CNC 8070
Page 1: ...CNC 8070 REF 0504 SOFT V02 0X PROGRAMMING MANUAL Soft V02 0x Ref 0504...
Page 2: ......
Page 4: ......
Page 6: ......
Page 12: ......
Page 14: ......
Page 16: ......
Page 22: ......
Page 26: ......
Page 28: ......
Page 30: ......
Page 32: ......
Page 34: ......
Page 62: ...Programming manual 28 CNC 8070 2 MACHINE OVERVIEW Home search SOFT V02 0X 28...
Page 178: ...Programming manual 144 CNC 8070 7 GEOMETRY ASSISTANCE General scaling factor SOFT V02 0X 144...
Page 360: ...Programming manual 326 CNC 8070 12 CYCLE EDITOR Random multiple machining SOFT V02 0X 326...
Page 556: ...CNC 8070 16 PROBING CANNED CYCLES SOFT V02 0X 522 Programming manual...