Rockwell Automation 8520-GUM 9/Series CNC Grinder Operation and Programming Manual Documentation Set User Manual

Page 695

Advertising
background image

Paramacros

Chapter 20

20-51

motions called for by that block first. After that block has been executed,
the control calls the macro specified by the G66 block.

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 repeated the number of times
as determined by the L word. If this is the case, the macro re-executes.

Each time that a specific macro is called by a motion command, it executes
the number of times programmed with the L word. All local variables
remain at their current value throughout the program unless replaced, the
control is reset, E-STOP is reset, or the control encounters an M02 or an
M30 code in a program.

An L word programmed with a G66 macro call cannot be replaced without
re-programming the entire G66 block with the new L word. An L word is
active each time the macro is called by the main program and causes the
macro to be executed the number of times programmed with L.

You can define the L word or any optional argument statements in a G66
block using any valid parametric expression. For example:

G66 P1002 L[#1+1] A[12*6] B[SIN[#101]];

Unlike non-modal macro calls, the G66 macro call repeats automatically
after any axis move until canceled 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 20.18

Modal Macro Call

N0100G66P1001;

N0200G65P1002;

In Example 20.18, after the complete execution of the macro 1002, the
macro 1001 is called. Any motion blocks in macro 1002 causes macro
1001 to be executed.

Advertising