4 amp-defined g-code macro call – Rockwell Automation 8520-GUM 9/Series CNC Grinder Operation and Programming Manual Documentation Set User Manual

Page 698

Advertising
background image

Paramacros

Chapter 20

20-54

Any time the macro is called (while executing the G66.1), the L word
programming the number of repetitions is in effect. Any attempt to
re-program an L word outside of a G66.1 block is interpreted as an
argument assignment for parameter #12.

Important: When nesting a macro (any macro including G66.1) within a
G66.1 macro, the outer G66.1 macro is executed after each individual
block of the nested macro, except for paramacro command blocks such as
assignment, goto, etc. See Example 20.21.

Example 20.21

Nesting a Modal Macro

N0100G66.1P1001;

N0200G65P1002;

After the execution of each individual block within the macro 1002, the
macro 1001 is called.

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

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

Use this format when calling an AMP-defined macro:

G_ A_ B_;

Where:

Determines:

G_

an AMP-defined G-code command (from G1 to G255.9).

A-Z

Optional argument statements. May be programmed using any letter from A to Z
excluding G, L, N, O, or P. Used to assign numeric values to parameters in the
paramacro. Arguments may be specified as any valid parametric expression.

An AMP-defined G-code macro is a G-code that is specified in AMP by
your system installer. When one of these AMP-defined G-codes is
executed in a part program, execution is transferred to the macro with the
program number associated to that G-code.

G-code values for paramacro calls can range from 1 to 255.9. Your system
installer can define a maximum of 25 AMP-defined G-codes to call
specific paramacro programs. The paramacro program name called with
the AMP-defined G-code is a program number from 1 to 8999 or 9010 to
9019. See your system installer’s documentation for details.

20.6.4
AMP-Defined G-Code
Macro Call

Advertising