Specifications

_____________________________________________________________________
_____________________________________________________________________
CONCISE GUIDE FANUC 86
MAIN
PROGRAM
SUB-
PROGRAM
SUB-
PROGRAM
SUB-
PROGRAM
O1
M98 P8001
M30
O8001
M98 P8002
M99
O8002
M98 P8003
M99
O8003
M99
Level 1 Level 2 Level 3
A sub-program is a normal program that ends with function M99. The same functions can be used inside
the sub-program as used in main programs (e.g. fixed cycles, geometric functions etc.)
To simplify their use, we suggest that sub-programs are given names from O8001 to O8999 (main
programs go from O1 to O8000)
A sub-program is run when it is called by the main program or by another sub-program.
To call up a sub-program, write:
M98 P
OOOO OOOO
Number name of
Repetition sub-program
(max 9999)
When the number of repetitions is omitted the NC assumes a value of 1
Example : sub-program 8003 is to be repeated 6 times consecutively
M98 P68003
Instruction “M99” that closes the sub-program is used to return to the main program (or to the sub-
program) in the block that immediately follows the running of the sub-program.