Page 1 of 1

made a lathe threading subroutine

Posted: Tue Mar 03, 2020 2:37 am
by turbothis
my dad helped me get this together since there is no g76 for the lathe
looks to be doing what i want as far as turning threads where i want them
i have noT cut anything yet but looks great on the G viewer

thoughts?

Code: Select all

G20 G18 
G00 X1.0 Z0.0
M04 S2200 
G04 P5 

#1=[0.01]  (DOC)
#2=[0.1]   (total DOC)
#3=[-1.0]  (length of cut)
#4=[0.05]  (thread pitch)

#9=0       (DOC so far)

M100
G00Z.0X0
M98 P100 L[#2/#1]  (no. of passes = total depth / DOC)
M2

O100
X-#9     
#9= [#9+#1]
G32 Z#3F#4
G0X1
Z.0
m99

Re: made a lathe threading subroutine

Posted: Tue Mar 03, 2020 2:54 am
by TomKerekes
Hi turbothis,

Looks reasonable to me.

Thanks for sharing. Let us know how it works.

Re: made a lathe threading subroutine

Posted: Tue Mar 03, 2020 2:58 am
by turbothis
you bet i will! :D