Advertisement
Guest User

Untitled

a guest
Dec 14th, 2013
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. (info: Facing)
  2. ; TOUCH OFF Z zero FIRST
  3. ; variable 5410 is the current tool tip diameter so make sure
  4. ; your tool table is set correctly...
  5.  
  6. o<face>sub
  7. #<stock-diameter> = #1 (=1.000 Stock Diameter)
  8. #<cut-depth> = #2 (=0.010 Cut Depth)
  9. #<start-z> = #3 (=0.000 Start Z)
  10. #<end-z> = #4 (=-0.020 End Z)
  11. #<sfm> = #5 (=80 SFM)
  12. #<tool> = #6 (=1 Tool)
  13. #<max-rpm> = #7 (=2000 Max RPM)
  14. #<feed-rate> = #8 (=2 Feed IPM)
  15. #<coolant>= #9 (=8 Coolant 8 On 9 Off)
  16. #<setZzero>= #10 (=0 Set Z0 0=No 1=Yes)
  17.  
  18. ; SETUP TOOL
  19. G18
  20. T#<tool> M6
  21. G43
  22. G7 G96 D#<max-rpm> S#<sfm>
  23. F#<feed-rate>
  24.  
  25. M3 M#<coolant>
  26.  
  27. #<inital-z> = [#<start-z>+0.050]
  28. G0 X[#<stock-diameter>+0.050] Z[#<inital-z>]
  29.  
  30. #<current-z> = #<start-z>
  31.  
  32. o100 while[#<current-z> gt #<end-z>]
  33. o101 if[#<current-z>-#<cut-depth> gt #<end-z>]
  34. #<current-z> = [#<current-z>-#<cut-depth>]
  35. o101 else
  36. #<current-z> = #<end-z>
  37. o101 endif
  38. Z[#<current-z>]
  39. G1 X-[#5410*3]
  40. Z[#<current-z>+#5410+#5410]
  41. G0 X[#<stock-diameter>+0.05]
  42. o100 endwhile
  43.  
  44. M5 M9
  45.  
  46. ; set Z zero to end of stock
  47. o110 if [#<setZzero> EQ 1]
  48. G0 Z[#<current-z>]
  49. G10 L20 P1 Z0.000
  50. G4P1.0
  51. (MSG,Z Zero Set To Face)
  52. o110 endif
  53. G53 G0 X0 Z0
  54. G97
  55. o<face>endsub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement