13. Program Support Functions
13.5 User Macro Specifications
311
Restrictions
(1) Calling a macro with an ASCII code from a program macro-called with an ASCII code
A macro cannot be called with an ASCII code from a program macro-called with an ASCII
code.
The other patterns are shown below.
If it is determined that the macro cannot be called, the command will be handled as a normal
command.
Called side
ASCII
GMSTB
macro
G65/66/66.1 G22
ASCII
× ×
GMSTB macro
× ×
G65/66/66.1
Calling
side
G22
(2) Nest level of macro call command
The macro subprogram can be called in up to four levels using simple call (G65) and modal
call (G66/G66.1).
The macro call command's argument is valid only in the called macro level.
Since the macro call nest level is four levels, the argument for each macro call can be used in
the program as a local variable.
(3) Nest level of subprogram call
Counting the main program as 0, up to eight levels of subprograms can be called (G22) from a
subprogram.
The following commands are used for subprogram nesting.
(a) G22
(b) G65 G66 G66.1
(c) G code call Miscellaneous function call (M/S/T/B)
(d) MDI
interruption
(e) Automatic tool length measurement
(f) Multiple-step skip function
The following commands can be commanded regardless of nesting.
(g) Fixed
cycle
(h) Macro
interruption