Facing

More
02 Sep 2013 18:09 #38417 by BigJohnT
Facing was created by BigJohnT
This is my facing subroutine from my Hardinge CHNC lathe. It assumes you have a tool changer if not you will have to change it a little.
(info: Facing)
; TOUCH OFF Z zero FIRST
; variable 5410 is the current tool tip diameter so make sure
; your tool table is set correctly...

o<face>sub
#<stock-diameter> = #1 (=1.000 Stock Diameter)
#<cut-depth> = #2 (=0.010 Cut Depth)
#<start-z> = #3 (=0.000 Start Z)
#<end-z> = #4 (=-0.020 End Z)
#<sfm> = #5 (=80 SFM)
#<tool> = #6 (=1 Tool)
#<max-rpm> = #7 (=2000 Max RPM)
#<feed-rate> = #8 (=2 Feed IPM)
#<coolant>= #9 (=8 Coolant 8 On 9 Off)
#<setZzero>= #10 (=0 Set Z0 0=No 1=Yes)

; SETUP TOOL
G18
T#<tool> M6
G43 
G7 G96 D#<max-rpm> S#<sfm>
F#<feed-rate>

M3 M#<coolant>

#<inital-z> = [#<start-z>+0.050]
G0 X[#<stock-diameter>+0.050] Z[#<inital-z>]

#<current-z> = #<start-z>

o100 while[#<current-z> gt #<end-z>]
 o101 if[#<current-z>-#<cut-depth> gt #<end-z>]
  #<current-z> = [#<current-z>-#<cut-depth>]
 o101 else
  #<current-z> = #<end-z>
 o101 endif
Z[#<current-z>]
G1 X-[#5410*3]
Z[#<current-z>+#5410+#5410]
G0 X[#<stock-diameter>+0.05]
o100 endwhile

M5 M9

; set Z zero to end of stock
o110 if [#<setZzero> EQ 1]
  G0 Z[#<current-z>]
  G10 L20 P1 Z0.000
  G4P1.0
  (MSG,Z Zero Set To Face)
o110 endif
G53 G0 X0 Z0
G97
o<face>endsub

JT
The following user(s) said Thank You: Dinuka_Shehan

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

Time to create page: 0.152 seconds
Powered by Kunena Forum