Originally Posted by
samu
G0 G90 G17 G54 X... Y... M3 S.... (GO TO CENTER OF THE FIRST HOLE START SPINDLE)
..
G0 G91 G28 Z0 M9 (RETURN TO Z HOME, STOP COOLANT)
%
O9202
G91 G03 X-[[#3-#7]/2 Y0 I-[[#3-#7]/4] Z[#17/2] (HELICAL LEAD IN, HALF CIRCLE WITH A RADIUS OF (THREAD DIAMETER-CUTTER DIAMETER)/4 AND A Z MOVE OF PITCH/2)
..
G0 G90 Z[#18+1.](RETRACT 1MM ABOVE SURFACE)
%
macro should'nt operate the tool change and activate tool lenght offset because it should work for evry tool, that's why I do that in the main in my example, but if you want that macro do it, you can define the tool in the line of the macro call with one more argument(an argument is a value that you define in the macro call and this value is passed to the macro, each letter in the line of the macro call represent an argument),think carrfully at wath exactly you want the macro does, your the only one to know your need, and remember, with macro programming, you are the boss you choose wath each letter represent and wath this custom cycle do exactly. Give me more details and I will suggest you a way to do wath you want.