-
Notifications
You must be signed in to change notification settings - Fork 0
/
POCKET CUT.TAP
62 lines (45 loc) · 1.01 KB
/
POCKET CUT.TAP
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
%
O2007
(RICHARD WARDIN)
(POCKET CUT MACRO)
(R = RAPID PLANE)
(Z = FINAL Z DEPTH)
(K = Z INCREMENT)
(X = XSIZE OF POCKET)
(Y = YSIZE OF POCKET)
(D = DIAM OF TOOL)
(I = X POSITION OF POCKET)
(J = Y POSITION OF POCKET)
#101 = #18 (R - RAPID PLANE)
#102 = #26 (Z - FINAL Z DEPTH)
#103 = #12 (K - Z INCREMENT)
#104 = #24 (X - XSIZE OF POCKET)
#105 = #25 (Y - YSIZE OF POCKET)
#106 = #4 (D - DIAM OF TOOL)
#107 = #9 (I - X POS OF POCKET)
#108 = #10 (J - Y POS OF POCKET)
(CALCULATE TRUE VALUES)
#104 = #104 - #106 (X SIZE -= DIAM)
#105 = #105 - #106 (Y SIZE -= DIAM)
#107 = #107 + [#106/2] (X POS += DIAM/2)
#108 = #108 + [#106/2] (Y POS += DIAM/2)
(START Z VALUE)
#110 = #101 + #103
(LOOP THROUGH THE Z DEPTH)
WHILE[#110GE#102]DO1
(SET X POSITION)
#109 = #107
(LOOP THROUGH THE X)
WHILE[#109LE[#107+#104]]DO2
(CUT THE Y)
G00 X#109 Y#108
G00 Z#101 (GO DOWN TO RAPID)
G01 Z#110 (GO DOWN TO CUT DEPTH)
Y[#108 + #105]
G00 Z2.0
#109 = #109 + #106
END2
#110 = #110 + #103 (ADD K INCREMENT)
END1
M99
%