Boring

More
02 Sep 2013 18:15 #38420 by BigJohnT
Boring was created by BigJohnT
This is my boring subroutine for my lathe.
(info: ID Boring)
o<id>sub
#<Hole_Dia>       = #1 (Starting Hole Diameter)
#<Final_Dia>      = #2 (Final Hole Diameter)
#<Depth_Cut>      = #3 (=0.010 Depth of Cut)
#<Spring_Cuts>    = #4 (=0 Spring Cuts) 
#<Z_StartOfCut>   = #5 (=0.100 Z Start of Cut)
#<Z_EndOfCut>     = #6 (Z End of Cut)
#<SurfaceSpeed>   = #7 (=80 Surface Speed)
#<FeedRate>       = #8 (=2 Feed IPM)
#<MaxSpindle_RPM> = #9 (=1500 MAX RPM)
#<ToolNumber>     = #10 (Tool Number)
#<Coolant>        = #11 (=8 Coolant 8 On 9 Off)


T#<ToolNumber> M6
G43 G7 G96 D#<MaxSpindle_RPM> S#<SurfaceSpeed>

; Bore the ID
M3 M#<Coolant>
G0 X#<Hole_Dia> Z#<Z_StartOfCut>
#<Current-Diameter> = #<Hole_Dia>

o100 while [#<Current-Diameter> lt #<Final_Dia>]

O101 if [#<Current-Diameter> + #<Depth_Cut> lt #<Final_Dia>]
#<Current-Diameter> = [#<Current-Diameter> + #<Depth_Cut>]
O101 else
#<Current-Diameter> = #<Final_Dia>
O101 endif

X#<Current-Diameter>
G1 Z#<Z_EndOfCut> F#<FeedRate>
G0 X[#<Current-Diameter>-0.010]
Z#<Z_StartOfCut>
o100 endwhile

o102 while [#<Spring_Cuts> gt 0]
G1 X#<Final_Dia>
Z#<Z_EndOfCut>
X[#<Final_Dia>-0.010]
G0 Z#<Z_StartOfCut>
#<Spring_Cuts> = [#<Spring_Cuts> -1]
o102 endwhile

G0 X[#<Current-Diameter>-0.010]
M5 M9
Z#<Z_StartOfCut>
G53 G0 X0 Z0
o<id>endsub

JT

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

Time to create page: 0.081 seconds
Powered by Kunena Forum