Rockwell Automation 8520 9/Series CNC Lathe User Manual

Page 279

Advertising
background image

Introduction to Programming

Chapter 10

10-11

All program blocks must have an end of block statement as the last
character in the block. This character tells the control how to separate data

into blocks. The control uses the “;” to mark the end of a block.

Important: When performing an EOB search, the search is executed from

the beginning of the part program, NOT from the point of display.

To specify an end of block character “;” at the keyboard use the [EOB] key

on the operator panel. If you are editing part programs off line you cannot

enter the end of block character when blocks are keyed in. See chapter 7.

The control automatically inserts end of block “;” when the program is

downloaded.

When the same series of blocks is 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:

Main and subprograms
Subprogram calls

Important: To make jumps, loops, or calculations within an executing

program or subprogram, use any of the paramacro features described in

chapter 28.

You can call a subprogram in an MDI command; however, a MDI

command cannot contain an M99 code.

CAUTION: Any edits that you make to a subprogram or

paramacro program (as described on page 5-4) 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 described on page

7-6).

10.2.5

End of Block Statement

10.3

Using Subprograms

Advertising