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

PROGRAMMING
16. CUSTOM MACRO
B–62754EN/01
307
O9001(M03); Macro to start counting. . . . . . . . . . . . . . . . . . . . . . . . . .
M01;
IF[FIX[#4120/100] EQ 0]GOTO 9;
No tool specified. . . . . . . . . . . . .
IF[FIX[#4120/100] GT 5]GOTO 9; Out–of–range tool number. . . . . .
#3002=0; Clears the timer.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
N9 M03; Rotates the spindle in the forward direction.. . . . . . . . . . . . . .
M99;
O9002(M05);
Macro to end counting. . . . . . . . . . . . . . . . . . . . . . . . . . .
M01;
IF[FIX[#4120/100] EQ 0]GOTO 9;
No tool specified. . . . . . . . . . . . .
IF[FIX[#4120/100] GT 5]GOTO 9; Out–of–range tool number. . . . . .
#[500+FIX[#4120/100]]=#3002+#[500+FIX[#4120/100]];
Calculates cumulative time.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
N9 M05; Stops the spindle.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
M99;
Macro program
(program called)

Leave a Reply

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