Owner manual

Paramacros
Chapter 20
20-52
Example 20.19 illustrates modal macro operation.
Example 20.19
Modal Macro Operation
(MAIN);
O1000;
NO10G90;
N020G66P1001L2A1.1;
N030X1;
N040Z.25
N050G66P1002A2;
N060X1.;
N070G67;
N090G67;
N100M30;
Parameter #1 is setat 1.1 in macro1001.
XAxisismoved 1 unitand then macro1001 is called and
executed 2 times.
Z Axisis moved .25units and then macro1001 is called and
executed 2 times.
Parameter#1 is setat 2. in macro 1002
.
Xaxisis moved1unitthen macro 1002 is called and
executed once.
Macro 1002 iscanceled.
Macro 1001 iscanceled.
(MACRO);
O1001;
N200Z#1;
N210#1=1.7
N220M99;
Z Axismoves an amountequal to thecurrentvalue for
parameter #1
Parameter#1 formacro1001isset at1.7.
Macroend.
(MACRO);
O1002;
N300Z#1;
N310M99;
Z Axismoves an amountequal to thecurrentvalue set
parameter #1 (in thiscasealways 2 units). Macro1001is
calledandexecuted twice.
Macroend.
Important: When the control executes block N040, the original value as
set in block N020 for paramet er number 1 is ignored, and the most current
value (1.7) is used. The first time macro 1001 is executed, Z moves 1.1
units. The second time macro 1001 is executed, Z m oves 1.7 units.
Use this format when calling a paramacro using the G66. 1 command:
G66.1 P_ L_ A_ B_;
Where: Determines:
P
theprogram numberof thecalledmacro. P ranges from1 - 99999.
L
thenumber oftimesthemacroisexecuted. L ranges from1 - 9999,andcanbe
expressed as any valid parametricexpression. Ifnot specified,thecontrolusesa
defaultvalue of1.
A-Z
Optional argumentstatements. May be programmedusingany letterfromAto Z
excludingG,L, N, O,orP. Used toassign numericvalues toparameters in the
paramacro. Argumentsmaybespecifiedas any valid parametricexpression.
20.6.3
ModalParamacro Call
(G66.1)