
Paramacros
Chapter 20
20-50
Use this format when calling a paramacro using the G65 command:
G65 P_ L_ A_ B_;
Where: Determin es:
P
theprogram numberof thecalledmacro. P ranges from1 - 99999.
L
thenumber oftimesthemacroisexecuted. L ranges from1 - 9999,andcanbe
expressed as any valid parametricexpression. Ifnot specified,thecontrol uses a
defaultvalue of1.
A-Z
Optional argumentstatements. Maybe programmedusingany letterfromAto Z
excludingG,L, N, O,orP. Usedtoassign numericvalues toparametersin the
paramacro. Argumentsmaybespecifiedas any valid parametricexpression.
The G65 command is non-modal. The macro is executed only at the time
the control executes the G65 block. The control calls the macro specified
by the G65 block as programmed by the P word.
This macro is executed until the control reaches an M99 macro return
code. The macro then returns to the next unexecuted sequential block in
the calling program unless the macro has not been repeat ed the number of
times as determined by the L word. If this is the case, the macro
re-executes.
You can define the L word or any optional argument statements in a G65
block using any valid parametric expression. For example:
G65 P1002 L[#1+1] A[12*6] B[SIN[#101]];
Use this format when calling a paramacro using the G66 command:
G66 P_ L_ A_ B_;
Where: Determin es:
P
theprogram numberof thecalledmacro. P ranges from1 - 99999.
L
thenumber oftimesthemacroisexecutedafter each motionblock thatfollowsthe
G66. L rangesfrom1-9999, and can be expressedas any validparametric
expressi on. Ifnot specified,thecontrol uses a defaultvalue of1.
A-Z
Optional argumentstatements. Maybe programmedusingany letterfromAto Z
excludingG,L, N, O,orP. Usedtoassign numericvalues toparametersin the
paramacro. Argumentsmaybespecifiedas any valid parametricexpression.
The G66 command is modal and remains in effect until canceled with a G67
block. The macro programmed by the P word in the G66 block is not
executed when the G66 block is read. The control delays macro execution
to any block following the G66 command that contains a motion command.
When the control encounters a motion block (even if this block is
contained in a different macro) following the G66 block, it executes the
20.6.1
Non-Modal Paramacro Call
(G65)
20.6.2
ModalParamacro Call (G66)
Comentarios a estos manuales