
18.CUSTOM MACRO NC FUNCTIONS B-63322EN/03
- 236 -
A value is set to a variable by <argument assignment>.
Write the actual value after the address.
Example A5.0E3.2M13.4
There is a regulation on which address (A - Z) corresponds to
which variable number.
- Modal call A (Moving command call)
G66 P (macro number) L (times to repeat)
<argument assignment> ;
Each time a move command is executed, the specified custom
macro body is called.
This can be canceled by G67.
This function is useful when drilling cycles are programmed as
custom macro bodies.
- Modal call A (Moving command call) (individual-block call)
G66.1 P (macro number) L (times to repeat) <argument
assignment>;
The specified custom macro body is called unconditionally for
each NC command block. This can be canceled by G67.
- Macro call by G codes
The macro can also be called by the parameter-set G codes.
Instead of commanding:
N_ G65 Pffff <argument assignment> ;
macro can be called just by commanding:
N_ G** <argument assignment> ;.
G code for calling the macro, and macro program number ffff to
be called, are coupled together and set as parameter.
- Macro call by M code
Custom macros can be called by pre-determined M codes which
are set by parameters.
The following command
N_ G65 Pffff <Argument assignment> ;
is equivalent to the following command:
N_ Mxx <Argument assignment> ;
The correspondence between M codes (Mxx) and program
number (ffff) of a macro shall be set by a parameter.
Signal M code are not sent out the same as the subprogram call by
M code.
- Sub program call by M code
An M code can be set by parameter to call a sub program. Instead
of commanding:
N_ G_ X_ Y_ … M98 Pffff ; ,
the same operation can be performed simply by commanding:
N_ G_ X_ Y_ … MXX ;.
As for M98, M codes are not transmitted.
The M code XX for calling the sub program and the sub program
number ffff to be called are coupled together and set by parameter.