FANUC Series 16/18/160/180-Model C Machining Center Operators Manual

PROGRAMMING
16. CUSTOM MACRO
B–62764EN/01
370
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 G42 X#1 Y#1 F300 ;
G02 X#1 Y–#1 R#1 ;
:
:
:
M99 ;

Leave a Reply

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