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

Page 656

Advertising
background image

Paramacros

Chapter 20

20-12

In Example 20.9, blocks N2 through N6 are executed 9 times. At that time
the condition in block N2 becomes false and program execution is
transferred to block N7.

Nesting is possible with a WHILE-DO-END command. We defined
nesting as one WHILE-DO-END program segment executing within
another WHILE-DO-END program segment. WHILE-DO-END nesting is
limited to 3 independent segments at one time.

Example 20.10 illustrates the use of nested WHILE-DO-END commands.

Example 20.10

Nested WHILE DO Commands

N1#1=1;

N2WHILE[#1LT10]DO1;

N3#1=[#1+1];

N4WHILE[#1EQ2]DO2;

N5...;

N6END2;

N7END1;

N8...;

In Example 20.10, blocks N2 through N7 are repeated until the condition
in block N2 becomes false. Within DO loop 1, DO loop 2 is repeated until
the condition in block N4 becomes false.

This section contains the following subsections:

Topic:

On page:

Local Parameters Assignment

20-13

Common Parameters

20-15

System Parameters

20-16

PAL Parameters

20-37

The following subsections cover assigning different parameter values and
how to use these parameters in a paramacro. Paramacros use parameters in
place of numeric values. Parameters are used as variables.

There are 4 types of parameters that you can call in a paramacro:

local - independent set of variables assigned to each nested macro
common - variables available to all programs
system - variables that indicate specific system condition
PAL - provide variables shared between part and PAL programs

20.3
Parameter Assignments

Advertising