Rockwell Automation 8520 9/Series CNC Lathe User Manual

Page 719

Advertising
background image

Paramacros

Chapter 28

28-45

Unlike nonmodal macro calls, the G66 macro call repeats automatically

after any axis move until cancelled by a G67 block. This also applies to

nested macros. When the control begins execution of the nested macro

1002 in the program below, each axis move in the nested macro also calls

for the execution of the macro 1001.

Example 28.18

Modal Macro Call

N0100G66P1001;

N0200G65P1002;

In Example 28.18, after the complete execution of the macro 1002, the

macro 1001 is called. Any motion blocks in macro 1002 will cause macro

1001 to be executed.

Example 28.19

Modal Macro Operation

(MAIN);

O1000;
NO10G90;
N020G66P1001L2A1.1;
N030X1;

N040Z.25

N050G66P1002A2;
N060X1.;

N070G67;
N090G67;
N100M30;

Parameter #1 is set at 1.1 in macro 1001.

X Axis is moved 1 unit and then macro 1001 is called and

executed 2 times.

Z Axis is moved .25 units and then macro 1001 is called and

executed 2 times.

Parameter #1 is set at 2. in macro

1002.

X axis is moved 1 unit then macro 1002 is called and

executed once.

Macro 1002 is canceled.

Macro 1001 is canceled.

(MACRO);

O1001;
N200Z#1;

N210#1=1.7
N220M99;

Z Axis moves an amount equal to the current value for

parameter #1

Parameter #1 for macro 1001 is set at 1.7.

Macro end.

(MACRO);

O1002;
N300Z#1;

N310M99;

Z Axis moves an amount equal to the current value set

parameter #1 (in this case always 2 units). Macro 1001 is

called and executed twice.

Macro end.

Advertising