Owner's manual

Paramacros
Chapter 28
28-48
Unlike non-modal 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 issetat1.1inmacro 1001.
XAxisismoved1 unitandthenmacro 1001iscalled and
executed 2times.
Z Axis is moved .25 units andthen macro 1001 is called and
executed 2times.
Parameter #1 issetat2.inmacro
1002.
Xaxisis moved 1unitthen macro 1002 iscalledand
executed once.
Macro 1002iscanceled.
Macro 1001iscanceled.
(MACRO);
O1001;
N200Z#1;
N210#1=1.7
N220M99;
Z Axis movesan amountequal to the currentvaluefor
parameter#1
Parameter #1 formacro1001 issetat1.7.
Macro end.
(MACRO);
O1002;
N300Z#1;
N310M99;
Z Axis movesan amountequal to the currentvalueset
parameter#1(inthis casealways2 units). Macro 1001is
calledand executedtwice.
Macro end.