Quote Originally Posted by samu View Post

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.
I understood the program that you've written and I can feel that this would be easy for the operator. One thing which bugs me is do we need to write program in incremental form?
You've wrote the program based on the need that there are many repetitions of same hole which is absolutely what I want. But I write all the programs in absolute mode, because I hate calculating values every time for incremental mode and is confusing to my mind. So in such case where my application is the same, can the same program be written only in absolute mode or do I need to get along with incremental? It's NOT that I don't know anything about incremental but I refrain from using it wherever possible. If there's no option I'm ready to use it.

Thanks :cheers: