;tapping o sub ; o call # = #1 # = #2 # = #3 # = #4 # = #5 # = #6 # = #7 # = #<_z> (starting Z) o100 if [# NE #<_current_tool>] (MSG,ERROR : Set tool before use macro) o100 return [-2] ; indicate failure to epilog o100 endif G7 ; diameter mode G17 ; XY Plane G21 ; Metric Units G90 ; Absolute Distance G91.1 ; but not for arcs # = [[1000 * #] / [3.1415 * #]] ; metric mode RPM G97 S# ; Constant RPM mode G97 S500 M3 ; Start Spindle G4 P1 ; Wait to reach speed o110 if [#] M8 o110 endif (DEBUG,Tapping dia-# depth-# asked-speed-# pitch-# tool-# calculated-rpm-# start-Z-#) # = [# + #] ; taking care of spindle ramp distance G98 G0 X0 ; must drill from the centerline. Tool should be zeroed here G33.1 Z# K# G80 M5 M9 ; o call ; restore g20/21, g90/g91, feedrate cuter-comp and other using now global _backup_var o endsub M2 %