I had a situation yesterday where I was running a program cutting a pocket, and I was dealing with tool wear. My pocket ended up a little tight, and I did not have access to a CAM system to simply reprogram it. I started thinking about my options, and that's when I thought of cutter comp. I have never really used it, so I don't understand how to position it within the program. I could have added cutter comp without ever reprogramming, and got the clearance I needed on my pocket.
The program I am running is a small pocket done with a 1/8" endmill. The pocket is odd shaped and not round. I have a full depth cut (-.020") to spiral from inside to outside with a .025 stepover, and then a final contour of the walls at full depth.
Here is the program:
%
O0000
N1 G20
N2 G0 G17 G40 G49 G80 G90
N3 T1 M6
N4 G0 G90 G54 X.7763 Y-1.3824 S10000 M3
N5 G43 H1 Z2. M8
N6 G4P5
N7 Z.01
N8 G1 Z-.02 F.3
N9 G3 X.7669 Y-1.373 I-.0094 J0. F5.5
N10 X.7576 Y-1.3824 I0. J-.0094
N11 X.7794 Y-1.4042 I.0218 J0.
N12 X.8013 Y-1.3824 I0. J.0218
N13 X.7669 Y-1.348 I-.0344 J0.
N14 X.7326 Y-1.3824 I0. J-.0344
N15 X.7794 Y-1.4292 I.0468 J0.
N16 X.8263 Y-1.3824 I0. J.0468
N17 X.7669 Y-1.323 I-.0594 J0.
N18 X.7076 Y-1.3824 I0. J-.0594
N19 X.7794 Y-1.4542 I.0718 J0.
N20 X.8513 Y-1.3824 I0. J.0718
N21 X.7669 Y-1.298 I-.0844 J0.
N22 X.7534 Y-1.2991 I0. J-.0844
N23 G1 X.6908 Y-1.346
N24 G3 X.6826 Y-1.3824 I.0761 J-.0364
N25 X.7794 Y-1.4792 I.0968 J0.
N26 X.8763 Y-1.3824 I0. J.0968
N27 X.7891 Y-1.2753 I-.1094 J0.
N28 G1 X.6582 Y-1.371
N29 G3 X.6576 Y-1.3824 I.1087 J-.0114
N30 X.753 Y-1.5014 I.1218 J0.
N31 X.7542 Y-1.5011 I-.0113 J.0393
N32 G2 X.8627 Y-1.4714 I.4864 J-1.5674
N33 G3 X.8997 Y-1.4021 I-.0833 J.089
N34 G1 Y-1.3618
N35 G3 X.8176 Y-1.258 I-.1328 J-.0206
N36 G1 X.6328 Y-1.3905
N37 G3 X.6705 Y-1.4809 I.1466 J.0081
N38 G1 X.8997 Y-1.2943
N39 G3 X.8442 Y-1.243 I-.1328 J-.0881
N40 G1 X.6095 Y-1.4083
N41 G3 X.6298 Y-1.4669 I.1699 J.0259
N42 G1 X.8997 Y-1.2545
N43 G3 X.87 Y-1.2295 I-.1328 J-.1279
N44 G1 X.5873 Y-1.4254
N45 G3 X.5966 Y-1.4555 I.1921 J.043
N46 G1 X.7284 Y-1.5008
N47 G3 X.7417 Y-1.503 I.0133 J.0387
N48 X.7542 Y-1.5011 I0. J.0409
N49 G2 X.886 Y-1.4661 I.4864 J-1.5674
N50 G3 X.8997 Y-1.449 I-.0038 J.0171
N51 G1 Y-1.243
N52 G3 X.8822 Y-1.2255 I-.0175 J0.
N53 X.8745 Y-1.2273 I0. J-.0175
N54 X.7218 Y-1.3223 I.4112 J-.8314
N55 G1 X.5889 Y-1.4241
N56 G3 X.582 Y-1.438 I.0106 J-.0139
N57 X.5938 Y-1.4546 I.0175 J0.
N58 G1 X.5966 Y-1.4555
N59 G0 Z.05
N60 X.9097 Y-1.449
N61 Z.01
N62 G1 Z-.02 F.3
N63 Y-1.243 F5.5
N64 G3 X.8822 Y-1.2155 I-.0275 J0.
N65 X.87 Y-1.2184 I0. J-.0275
N66 X.7157 Y-1.3144 I.4157 J-.8403
N67 G1 X.5828 Y-1.4162
N68 G3 X.572 Y-1.438 I.0167 J-.0218
N69 X.5906 Y-1.464 I.0275 J0.
N70 G1 X.7251 Y-1.5103
N71 G3 X.7417 Y-1.5131 I.0166 J.0482
N72 X.7572 Y-1.5106 I0. J.051
N73 G2 X.8882 Y-1.4758 I.4834 J-1.5579
N74 G3 X.9097 Y-1.449 I-.006 J.0268
N75 G0 Z2.
N76 M5
N77 M9
N78 M30
%
Lines 1-59 are the spiral roughing of the pocket. The final contour of the walls starts at line 60.
After reading about cutter comp, I understand the difference between the two. If I am looking a the tool from behind the cut, G41 is left and G42 is right. In this case, I am climb milling the pocket, which means I'm cutting in a counterclockwise motion. I would assume that when compensation is necessary, it would only be needed on the final contour pass of the program. If this is the case, I am thinking that a G42 (cutter comp right) should be put in somewhere around or before line 60. I also understand that I have to have a D in there as well, and since the tool number is 1, I can use D1. D1 references the offset page where I can then enter the exact size of my tool - say .124", for tool #1.
When the pocket operation is finished, I need the G40 to cancel. I would think it would be entered somewhere around line 74 or 75.
A few questions:
1. Can the G42 D1 be entered on its own line, or does it have to be entered in a line with a G1 move?
2. Just as number #1, can the G40 be entered on its own line or does it have to be entered into a line with a G1 move?
3. When cutter comp is active, will it effect Z axis moves? I'm thinking that it will only affect X and Y since those are the G17 plane.
Some examples of how this should be coded would be great. I'm trying to understand this because I know I will be using it a lot going forward.
Thanks