Rockwell Automation 8520 9/Series CNC Lathe User Manual
Page 300
Introduction to Programming
Chapter 10
10-32
(10) End of Subprogram or Main Program Auto Start (M99)
M99 End of Subprogram or Paramacro program
When you execute M99, subprogram execution is completed and
program execution returns to the calling program. This word is not
valid in an MDI command, but it can be contained in a subprogram
called by an MDI command. For details on programming an M99, see
page 10-11 or chapter 28.
M99 End of Main Program with Auto Start
If you execute a program from memory, an M99 as the last block in a
main program stops program execution at that location. The program is
reset to the first block and a
program execution for you.
If you execute a program from an external device (such as a tape
reader), when M99 is executed, program execution stops and the tape is
automatically rewound to the beginning of the program just executed
and a
you.
CAUTION: The M99 code is commonly used as the end of
program for fully automated systems that automatically load the
next part to be machined. This code requires that some PAL
interface be written that assures the part is fully loaded and
ready for machining before block execution is allowed to
restart. Failure to do so can cause injury to operators or damage
to equipment.
For these systems some PAL interface should be written to assure that
the part is fully loaded before program execution is restarted.
(11) Simple Synchronization (M100-M149)
M100 - M149 — Simple Synchronization (dual-process system only)
These M-codes are for simple synchronization. When executed, this set
of M-codes does not re-setup any program blocks that have already been
read into program lookahead. See page 30-7.