Radius

More
02 Sep 2013 18:17 #38422 by BigJohnT
Radius was created by BigJohnT
This is my subroutine that I use to radius the edge of a part on my lathe.
o<radius> sub
#<x_dia> = #1 (=1.0 Diameter)
#<rad> = #2 (=.375 Radius)
#<z_start> = #3 (=0.000 Z Start)
#<doc> = #4 (=.025 DOC)
#<feed> = #5 (=5 Feed)
#<tool> = #6 (=1 Tool)
#<sfm> = #7 (=100 SFM)
#<rpm> = #8 (=2000 RPM)
#<coolant> = #9 (=8 Coolant)

#<z_step> = #<doc>
#<x_step> = [#<x_dia> - [#<doc> * 2]]

G7 G18 G40 F#<feed>
G96 D#<rpm> S#<sfm>
T#<tool> M6 G43
M3 M#<coolant>

G0 X[#<x_dia> + 0.100] Z[#<z_start>]
G41
o100 while [#<rad> GT #<z_step>]
G0 Z[#<z_start> + 0.050]
G0 X[#<x_dia> + 0.100]
G0 Z[#<z_start> - #<z_step>]
G1 X#<x_dia>
G2 X#<x_step> Z#<z_start> I-#<z_step> K0.0
#<x_step> = [#<x_step> - [#<doc> * 2]]
#<z_step> = [#<z_step> + #<doc>]
o100 endwhile

G40
G0 Z[#<z_start> + 0.050]
X[#<x_dia> + 0.100]
M5 M9
G53 G0 X0 Z0
o<radius> endsub
M2

JT
The following user(s) said Thank You: Rick G

Please Log in or Create an account to join the conversation.

Time to create page: 0.052 seconds
Powered by Kunena Forum