Rockwell Automation 8520 9/Series CNC Lathe User Manual

Page 681

Advertising
background image

Paramacros

Chapter 28

28-7

Use transfer of control commands to alter the normal flow of program

execution. Normally the control executes program blocks sequentially.

By using control commands, the programmer can alter this normal flow of

execution and transfer execution to a specific block or begin looping

(executing the same set of blocks repetitively).

Important: Transfer of control commands call a block by its N number. If

more than one N number exists in a block, the control uses only the

left-most N number in that block. If the same N number is used for more

than one block, the control will use the first block it encounters with the

correct N number (the control searches in the forward direction first, then

starts at the top of the program).

Two types of transfer of control commands are available:

Conditional ---- The execution of a jump or loop is dependant on
whether a mathematical condition is true.

Non-Conditional ---- The execution of a jump or loop is always
performed when that block is executed.

This section describes conditional operators that are available for

paramacro programming. A conditional operator causes a comparison

between two values and yields a result of true or false. Use conditional

operators in “IF” or “WHILE” commands as described on page 28-9 and

28-10.

Use the true or false condition to determine whether the “IF” or “WHILE”

blocks are executed. NO TAG lists the conditional operators available for

paramacro programming:

Table 28.C

Conditional Operators

Operator

Condition Tested

EQ

Equal

NE

Not Equal

GT

Greater Than

LT

Less Than

GE

Greater Than or Equal

LE

Less Than or Equal

28.2

Transfer of Control

Commands

28.2.1

Conditional Operators

Advertising