Rockwell Automation 8520-GUM 9/Series CNC Grinder Operation and Programming Manual Documentation Set User Manual

Page 651

Advertising
background image

Paramacros

Chapter 20

20-7

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

This section contains the following subsections:

Topic:

On page:

Conditional Operators

20-7

GOTO and IF-GOTO Commands

20-9

DO-END and WHILE-DO Commands

20-10

Use transfer of control commands to alter the normal flow of program
execution. Normally the control executes program blocks sequentially.
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 access 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 uses the first block it encounters with the
correct N number. The control searches for an N number starting at its
current position in the program and continuing to the end of the program.
If the N number is not found, the control returns to the top of the program
and continues the search.

Two types of transfer of control commands are available:

Conditional -- The control executes a jump or a loop depending on
whether a mathematical condition is true

Non-Conditional -- The control executes a jump or loop when the
control executes that block

This subsection covers 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. The use of
conditional operators in “IF” or “WHILE” commands is covered on pages
20-9 and 20-11.

The true or false condition determines whether the “IF” or “WHILE”
blocks are executed. Table 20.C lists the conditional operators available
for paramacro programming.

20.2
Transfer of Control
Commands

20.2.1
Conditional Operators

Advertising