All you should need is
Code: Select all
#5=[tan[#6] * #1] ( Increment for Z-axis per pass )
Moderators: TomKerekes, dynomotion
Code: Select all
#5=[tan[#6] * #1] ( Increment for Z-axis per pass )
Code: Select all
( threading starts at Z zero )
G20 G18
G00 X0.5 Z0.0 ( Clear plane )
M04 S500 ( Set spindle speed to 500 RPM )
G04 P3 ( Dwell for 3 seconds )
#1=[0.0025] ( Depth of Cut )
#2=[0.40] ( Total depth of thread )
#3=[0.560] ( Length of thread / start position )
#4=[0.0394] ( Thread pitch / per rotation )
#6=[-29] ( Desired angle in degrees )
#9=0 ( DOC so far )
#10=0 ( Cumulative Z-axis movement )
( Calculate the Z increment based on the angle and DOC )
#5=[tan[#6] * #1] ( Increment for Z-axis per pass )
M100
M98 P100 L[#2/#1] ( Number of passes = total depth / DOC )
M2
O100
X-#9
#9=[#9+#1] ( Increment DOC )
#10=[#10+#5] ( Increment cumulative Z-axis movement )
G32 Z#3 F#4
G0 X0.200
Z-#10 ( Increment cumulative Z-axis movement )
M99
Code: Select all
X[-#9 * 2]