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

Page 701

Advertising
background image

Paramacros

Chapter 20

20-57

An AMP flag for that specific word must be turned on by your system
installer to allow that word to call a macro.

The value for an AMP-defined T-, S-, or B-code command has the same
format and range as an ordinary T, S, or B code.

Important: Certain AMP-defined T-, S-, or B-code macro calls cannot be
called by other AMP-defined macro calls (see page 20-57 for details on
nesting macros).

Nesting occurs when one program calls another program. A subprogram
called by a main program is an example of nesting (the “nested” program
is the program called).

Nesting applies to macros as well. When the main program calls a macro,
the macro is said to be on nesting level 1. If this macro in turn calls
another macro, this second macro is said to be in nesting level 2. Macros
can be nested up to a maximum of four levels. However, if the maximum
number of nested paramacros (four) is combined with up to four
subprograms that end with M98, a maximum of eight levels of nesting can
be programmed.

What is not counted as an additional nested level? When a lower nested
macro with a modal feature forces a higher nested macro to call it, the
number of nested levels does not increase. Nor does it increase when a
subprogram is called using M98.

Take precautions when attempting to nest AMP assigned macro calls since
many combinations of these calls cannot be valid. Your system installer
determines in AMP the functionality of the AMP-defined macro call when
nested.

The following two options are available:

Works as a macro call -- When “works as a macro call” is selected, G-,
M-, T-, S-, or B-code macro calls that are nested and called by other G-,
M-, T-, S-, or B-code macro calls allow nesting as shown in Table 20.J.

20.6.7
Nesting Macros

Advertising