Manual

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 #1is set at 1.1 in macro1001.
X Axisis moved1 unit andthen macro1001 iscalled and
executed 2 times.
Z Axis is moved.25 unitsand then macro 1001is calledand
executed 2 times.
Parameter #1is set at 2. in macro 1002.
X axisis moved1 unit thenmacro 1002 iscalled and
executed once.
Macro 1002 is canceled.
Macro 1001 is canceled.
(MACRO);
O1001;
N200Z#1;
N210#1=1.7
N220M99;
Z Axis moves anamount equal tothe current valuefor
parameter #1
Parameter #1for macro 1001is set at 1.7.
Macro end.
(MACRO);
O1002;
N300Z#1;
N310M99;
Z Axis moves anamount equal tothe current valueset
parameter #1(in thiscase always2 units). Macro 1001is
called and executed twice.
Macro end.