
B-63322EN/03 NC FUNCTIONS 18.CUSTOM MACRO
- 233 -
18.1 CUSTOM MACRO
18.1.1 Custom Macro
A function covering a group of instructions is stored in the memory like
the sub program. The stored function is represented by one instruction
and is executed by simply writing the represented instruction. The
group of instructions registered is called the custom macro body, and
the representative instruction, the custom macro instruction.
The programmer need not remember all the instructions in the custom
macro body.
He needs only to remember the representative, custom macro
instruction.
The greatest feature in custom macro is that variables can be used in the
custom macro body. Operation between the variables can be done, and
actual values can be set in the variables by custom macro instructions.
Custom macro instruction
Ordinary program
Custom macro body
A group of
instructions for a
certain function
G65 P9011 A10 I5
Custom macro body
O9011 ;
X#1 Z#4 ;
Call custom macro body
9011, and set variables
#1=10, #4=5.
Variables, #1, #4
can be used
instead of unknown
move amount.