FANUC Series 16/18/160/180-Model C for Lathe Operator Manual

PROGRAMMING
16. CUSTOM MACRO
B–62754EN/01
274
16
 
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.
O0001 ;
:
:
:
G65 P9010 R50.0 L2 ;
:
:
M30 ;
Machining program
Custom macro
O9010 ;
#1=#18/2 ;
G01 X#1 Z#1 F0.3 ;
G02 X#1 Z–#1 R#1 ;
:
:
:
M99 ;

Leave a Reply

Your email address will not be published. Required fields are marked *