Rockwell Automation 8520 9/Series CNC Lathe User Manual

Page 302

Advertising
background image

Introduction to Programming

Chapter 10

10-34

The O-word is used to define a program name. To use an O word as a
program name it must be the first block entered in a program. This block

can be used to identify a program when reading from a tape (when

program name is selected as “automatic” from the device setup menu).

This is useful when many programs are placed together on a single tape.

An O-word can have up to 5 numeric characters following it.

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

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.

P-words in a subprogram call (M98) or paramacro call are used to

designate the specific program being called. The P address is followed by

the program name being called.

L-words in a subprogram call (M98) and some cycles are used to designate

a repeat count for a subprogram. The number following the L address

designates the number of times a subprogram is executed consecutively

before execution is returned to the main program.

For details on subprograms, see section 10.3.

The spindle function has two modes:

Spindle Mode:

Function:

Constant Surface Speed Mode (G96)

maintains a workpiece’s speed across a tool equal to a desired

cutting speed independent of the diameter.

Constant Spindle RPM Mode (G97)

maintains a constant spindle speed equal to the designated

S-word making the actual cutting speed dependant on the

working diameter.

Spindle speed and cutting speed values are programmed designated by an

S-word, followed by up to 4 digits. S-words are modal and remain active

until you designate another S-word is designated. Use a common S-word

to program all of the spindles AMPed to be in the system.

10.5.9

O-Words (Program Names)

10.5.10

P,L Words (Main Program

Jumps and Subprogram

Calls)

10.5.11

S-Words (Spindle Speed)

Advertising