Specifications

_____________________________________________________________________
_____________________________________________________________________
CONCISE GUIDE FANUC 85
5.0 SUB-PROGRAMS / PARAMETRIC PROGRAMMING
Sub-programs are useful to repeat the same operation several times, using inside the program the same
functions and co-ordinates already known to the operator
With parametric programming, variable values (parameters or variables #) can be attributed to the
program codes instead of fixed values (numeric values). A value can be assigned to a variable through
the program, from the MDI window, or inserting it in the variables table.
A variable is programmed with address # followed by a number
5.1 “M98” “M99” USE OF SUB-PROGRAMS
A program can be divided into main program and sub-programs.
Usually the NC operates under the control of the main program, but when an instruction is found that calls
up a sub-program the control passes over to the sub-program. When an instruction to return to the main
program is found, the control returns to the main program.
Sub-programs can be used when there are fixed repetitive sequences, simplifying the programming. A
sub-program can be called up by the main program. A sub-program that has been called can, in its turn,
call up another sub-program. Sub-program call-ups can be nested in up to four levels, as shown on the
next page: