Hey guys I have a peculiar problem that I can't sort out. I wrote a program to mill and thread mill two holes. It works fine, but every time I run the program through all the way to M30 at the end, all of my coordinates shift to the negative X direction. None of my offsets are changing, as I'm just using machine zero. If I run the program through the first tool only, it won't step over.
A few things to note: this is my first time programming thread milling. Any advice on how to do it better would be appreciated. Also, the G53 acrobatics is to position for clearance during tool changes.
Thanks in advance. Here's the code:
%
O02400
G52 X0 Y0 Z0
G10 G90 L2 P1 X0 Y0 Z0 A-1.72
G10 G90 L20 P3 X-12.7212 Y-8.9725 A-1.72
G10 G90 L12 P1 R0.25
G10 G90 L12 P2 R0.24
G00 G17 G20 G40 G49 G80 G90
G53 Z0.655
M06 T1
M03 S6000
G00 G90 G54 A0 X-19.5228 Y-19.7873
G43 H01 Z3.8874
G01 Z3.76 F10.
G12 I0.24 K0.34 Q0.125 F10. D01
G12 G91 I0.1695 L5 Z-0.11 F10.
G01 Z-0.55 F10.
G90 G00 G53 Z0.655
G90 G00 G54 X-19.5228 Y-18.9
G53 A-65.
Z-2.7742
Z-3.7742
G01 Z-3.8742 F10.
G12 G91 I0.1695 L5 Z-0.11 F10.
G01 Z-0.7 F10.
G90 G00 G53 Z0.655
G53 A0.
G53 Y0. X-10.
G53 A-90.
M06 T2
M03 S6000
G00 G90 G53 A0
G90 G00 G54 A0. X-19.5228 Y-19.7873
G43 H02 Z4.
Z3.76
G01 Z3.36
G01 G41 D02 X-19.3533 F10.
G03 I-0.1695 Z3.397 F5.
G01 G40 X-19.5228 F10.
G90 G53 G00 Z0.655
G90 G53 A-65.
X-19.5228 Y-18.9
Z-2.7742
Z-3.7742
G01 Z-4.2742 F10.
G01 G41 D02 X-19.3533 F10.
G03 I-0.1695 Z-4.2372 F5.
G01 G40 X-19.5228 F10.
G90 G53 G00 Z0.655
G53 A0.
G53 X-10. Y0
G53 A-90.
M06 T1
G53 X-20. A-38.5
M30
%