Rockwell Automation 8520 9/Series CNC Lathe User Manual

Page 277

Advertising
background image

Introduction to Programming

Chapter 10

10-9

Each block in a part program can be assigned a sequence number to
distinguish one block from another. Sequence numbers begin with an N

address, followed by a one to five digit numeric value.

Sequence numbers can be assigned at random to specific blocks or to all

blocks. If you assign sequence numbers to locks, you can designate their

sequence numbers. Sequence numbers are necessary to make program

jumps and to specify a block for paramacro calls and returns.

Below is an example of two blocks with sequence numbers 10000 and

10010.

N10000 X5.

Z4.

;

N10010 X2.

Z2.

;

When you assign sequence numbers to blocks the N-word comes first in

the block except when you designate block delete. See page 10-10. It is

not necessary to program the N-word first in the block. The control still

finds it for jumps; however, it will not find renumber operations.

If more than one N-word is in a block, the control uses only the first

N-word encountered for that block number.

Different blocks can be assigned the same sequence number. If this

number is called by a “GOTO” or some other command, the first block

found by the control with the sequence number that is closest to the calling

block is used. The control first searches for the sequence number in the

forward direction (from the calling block), then it searches in the reverse

direction (from the calling block). How the control reacts if the sequence

number is not found is determined by the specific operation being used.

The control has a programming feature that renumbers existing sequence

numbers or assigns all block sequence numbers.

Information between the control out code “(” and the control in code “)”
within a part program is regarded as a comment, and it is not handled as

significant information. The comment can be described in up to 128

characters (including the control out/in codes), consisting of alphanumeric

characters and special symbols.

Example 10.5

Program Block With Comment

N00010G91X5.(CHANGE TO INC.

MOVE X 5);

10.2.2

Sequence Numbers

10.2.3

Comment Blocks

Advertising