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

Page 707

Advertising
background image

Paramacros

Chapter 28

28-7

Attempting to use any of the above as MDI commands, 9/PC generates an
“ILLEGAL MACRO CMD VIA MDI” error message.

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 in sections 28.3.2
and 28.3.3 .

Use the true or false condition to determine whether the “IF” or “WHILE”
blocks are executed. Table 28.C 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.3
Transfer of Control
Commands

28.3.1
Conditional Operators

Advertising