Rockwell Automation 8520-MUM 9/Series CNC Mill Operation and Programming Manual Documentation Set User Manual

Page 286

Advertising
background image

Introduction to Programming

Chapter 10

10-12

When the same series of blocks are repeated more than once it is usually
easier to program them using a subprogram.

The key difference between a subprogram and a G65 paramacro is that a
paramacro always gets a new set of local parameters, a subprogram uses
the same set of local parameters that the main program used. See chapter
28 for details on paramacros and local parameters.

This section explains the following:

1) Main and subprograms

2) Subprogram calls

Important: To make jumps, loops, or calculations within an executing
program or subprogram use any of the paramacro features as discussed in
chapter 28.

CAUTION: Any edits that are made to a subprogram or
paramacro program (as discussed in chapter 5) that have already
been called for automatic execution are ignored until the calling
program is disabled and reactivated. Subprograms and paramacros
are called for automatic execution the instant that the calling
program is selected as active (as discussed in chapter 5).

It is possible to call a subprogram from the MDI command line.

10.3
Using Subprograms

Advertising