(program to single point right hand thread using 4th axis)
(set X zero at start of thread y0 at center and with z0 at surface)
s1000
f6
G90
G0 x0 Z.1 Y0
G92 A0 (set A to zero with no movement)
G0 z0
G1 z-.010 a-720 (cut to depth in two revolutions)
M98 P1234 (call sub)
g1 z-.013 x.00171 A-720 (cut pass depth to total of .054" for 16TPI or .866 * pitch)
(set over x by .57 of cut depth)
M98 P1234
g1 z-.016 x.00342 A-720
m98 p1234
g1 z-.019 x.00513 A-720
m98 p1234
g1 z-.021 x.00627 A-720
m98 p1234
g1 z-.023 x.00798 A-720
m98 p1234
g1 z-.025 x.00855 A-720
m98 p1234
g1 z-.026 x.00912 A-720
m98 p1234
g1 z-.027 x.00969 A-720
m98 p1234
g1 z-.027 x.00969 A-720
m98 p1234
m30 (end program)
O1234 (subroutine for one thread cut pass
G92 A0 (reset a to 0)
G91 (set to incremental move)
G1 X.5 A-2880 (thread cutting pass x=length of thread make sure to go past end of bar)
( and A = 1/TPI * length of thread note A is negative)
G90 (restore absolute move)
G0 z.1 (raise cutter and retun to start)
x0 z0
G92 A0 (reset A to 0)
m99