; Author: jthornton (info: inside diameter -- lathe boring) osub # = #1 (=0.500 Starting Hole Diameter) # = #2 (=0.625 Final Hole Diameter) # = #3 (=0.010 Depth of Cut) # = #4 (=0 Spring Cuts) # = #5 (=0.100 Z Start of Cut) # = #6 (=-0.600 Z End of Cut) # = #7 (=80 Surface Speed) # = #8 (=2 Feed IPM) # = #9 (=1500 MAX RPM) # = #10 (=8 Tool Number) # = #11 (=8 Coolant 8=On 9=Off) T# M6 ; G43: toollength offset ; G7: diameter mode ; G96: constant surface speed G43 G7 G96 D# S# ; Turn the OD M3 M# ; spindle cw, coolant on/off:w G0 X# Z# # = # o100 while [# lt #] O101 if [# + # lt #] # = [# + #] O101 else # = # O101 endif X# G1 Z# F# G0 X[#-0.010] Z# o100 endwhile o102 while [# gt 0] G1 X# Z# X[#-0.010] G0 Z# # = [# -1] o102 endwhile G0 X[#-0.010] M5 M9 ; stop spindle, all coolant off Z# G49 ; cancel tool length offset G53 G0 X0 Z0 ; move in machine coordinates oendsub