
16. CUSTOM MACRO
B–63172EN/01
NC FUNCTION
88
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.
Custom macro instruction
Custom macro body
A group of
instructions
for a certain
function
Ordinary program
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.
G65 P9011 A10 I5
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.
Custom macro body
r
b
a
Bolt hole circle as shown above can be programmed easily. Program a
custom macro body of a bolt hole circle; once the custom macro body is
stored, operation can be performed as if the CNC itself has a bolt hole
circle function. The programmer need only to remember the following
command, and the bolt hole circle can be called any time.
16.1
CUSTOM MACRO