
11. PROGRAM COMMAND B-63783EN-1/01
- 1162 -
11.5 CUSTOM MACRO
11.5.1 Custom Macro
General
Although subprograms are useful for repeating the same operation, the
custom macro function also allows use of variables, arithmetic and
logic operations, and conditional branches for easy development of
general programs such as pocketing and user-defined canned cycles. A
machining program can call a custom macro with a simple command,
just like a subprogram.
This means that a function of general use can be formed when
programming a certain function as a custom macro. That is, programs
can be written using variables for data that might change or be
unknown. This can be further applied to group technology.
Similar workpieces can be collected as a group and a universal custom
macro
body can be programmed using variables applicable to each group. In
this way,
programming is not required for the workpieces in the group.
The programmer only need to assign actual values to the variables.
O0001 ;
:
:
:
G65P9010 R50.0 L2 ;
:
:
M30 ;
Machinin
ro
ram
Custom macro
O9010 ;
#1=#18/2 ;
G01 G42 X#1 Y#1 F300 ;
G02 X#1 Y-#1 R#1 ;
:
:
:
M99 ;
β
α