Beruflich Dokumente
Kultur Dokumente
Problem : Write Custom Macro “B” (for FANUC Oi Mate – TB system) program for variable
peck drilling cycle : A hole of dia. 11 mm is to be drilled thru’ for the depth of 50 mm. Since
the hole is having L/D ratio of > 4, it is desirable to program for variable (i.e. uniformly
reducing depth type) pecks. Program the operation while referring to the following data.
Data :
i) Length of the first peck = 7.0 mm
ii) Decrement by which the subsequent pecks should uniformly reduce = 0.5 mm
iii) Retraction Amount after each peck = 1.5 mm.
iv) The drill should withdraw fully after every three pecks and it should dwell for 5.0
seconds for coolant blow to clean up the chips clogged on the cutting edges and the
flutes.
v) Dwell at the end of each peck = 2.0 seconds.
EQ - (==) - Equals
NE - (<>) - Not Equal
LT - (<) - Less than
GT - (>) - Greater than
Program :
O2222 (VARIABLE PECK DRILLING CYCLE);
N1;
T0000;
G28 U0 W0;
T0101;
G50 S1600;
G97 S1600 M03;
G0 Z20.0 M08;
X0.0;
Z2.0;
#99 = 7.0;
#100 = 7.0;
#101 = -2.0;
#102 = 0.0;
N10;
IF [ #100 GT 51.0 ] GOTO 30;
G0 Z-#101;
G1 Z-#100 F0.05;
G04 X2.0;
#101 = #100 – 1.5
G0 Z-#101;
#99 = #99 – 0.5;
#100 = #100 + #99;
#102 = #102 + 1;
IF [ #102 EQ 3 ] GOTO 20;
GOTO 10;
N20;
#102 = 0;
G0 Z2.0;
G04 X5.0;
GOTO 10;
N30;
G0 Z2.0 M09;
G97 M05;
G28 U0 W0;
M30;
%
Explanation of what exactly is happening to the variables after each iteration :
Value of each variable at each iteration while execution of the program proceeds :
Note : The 1st value of #101 for the first iteration is specified as = -2.0
because only during first iteration, the position of the drill tip should be
at Z-(-2.0) = Z+2.0. For subsequent iterations the value will be calculated
from within the loop.
________________
Jasmin C. Shah
CNC Application Engineering Consultant
Date : 4th September, 2006
EQ - (==) - Equals
NE - (<>) - Not Equal
LT - (<) - Less than
GT - (>) - Greater than