; Author: jthornton (info: outside diameter - lathe turning) o sub # = #1 (=0.260 Material Diameter) # = #2 (=0.180 Final Diameter) # = #3 (=0.010 Depth of Cut) # = #4 (=0.000 Final Cut) # = #5 (=100 Surface Speed) # = #6 (=2 Feed Rate) # = #7 (=1500 Max Spindle RPM) # = #8 (=-0.5 End of Cut) # = #9 (=0.100 Start of Cut) # = #10 (=6 Roughing Tool) # = #11 (=6 Finishing Tool) # = #12 (=8 Flood=8, Off=9) T# M6 ; G43: toolength offset ; G7: diameter mode ; G96: constant surface speed G43 G7 G96 D# S# ; Turn the OD M3 M# ; spindle cw, coolant on/off G0 X# Z# #=# o100 while [# gt #] O101 if [#-# gt #] #=[#-#] O101 else #=# O101 endif X# G1 Z# F# G0 X[#+0.025] Z# o100 endwhile G0 X[#+0.025] M5 M9 ; stop spindle, all coolant off Z# G49 ; cancel tool length offset compensation G53 G0 X0 Z0 ; move in machine coordinates o endsub