Custom Macro Variable Peck Drilling Cycle Macro
Custom Macro Variable Peck Drilling Cycle Macro
Custom Macro Variable Peck Drilling Cycle Macro
1 of 2
http://www.machinetoolhelp.com/Applications/macro/Variable_peck_dr...
LLC.
Privacy Information
Problem : Write Custom Macro B (for FANUC Oi Mate TB system) program for va
drilling cycle : A hole of dia. 11 mm is to be drilled thru for the depth of 50 mm. Sin
is having L/D ratio of > 4, it is desirable to program for variable (i.e. uniformly redu
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 t
flutes.
v) Dwell at the end of each peck = 2.0 seconds.
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;
%
Value of each variable at each iteration while execution of the program proceeds :
Iteration no.
1
2
#101- 1st
value
-2.0
5.5
#99
#100
7.0
6.5
7.0
13.5
#101 2nd
value
5.5
12.0
18.12.2007 07:28
2 of 2
http://www.machinetoolhelp.com/Applications/macro/Variable_peck_dr...
12.0
6.0
19.5
18.0
The drill will be withdrawn to Z2.0, will dwell for 5 seconds and will plunge in rapid to Z-18
4
5
6
18.0
23.5
28.5
5.5
5.0
4.5
25.0
30.0
34.5
23.5
28.5
33.0
The drill will be withdrawn to Z2.0, will dwell for 5 seconds and will plunge in rapid to Z-33
7
8
9
33.0
37.0
40.5
4.0
3.5
3.0
38.5
42.0
45.0
37.0
40.5
43.5
The drill will be withdrawn to Z2.0, will dwell for 5 seconds and will plunge in rapid to Z-43
10
11
12
43.5
45.0
48.0
2.5
2.0
1.5
47.5
49.5
51.0
45.0
48.0
49.5
13
13th
49.5
1.0
52.0
50.5
iteration will not be executed, the drill will remain out to Z2.0 and the program will en
________________
Jasmin C. Shah
CNC Application Engineering Consultant
Date : 4th September, 2006
Privacy Information
Back to top
home | purchasing | options & automation | program & applications | installation | Preventative maintenance | troubleshoot | repair | learning | forums | information
Machinetoolhelp.com all rights Reserved copyright 2003-2007
Privacy policy | Terms of use | Disclaimer
x
CNC
18.12.2007 07:28