I want to eliminate unneeded tool change stops for my mill turn setup. The milling spindle uses tools 1-100 and requires a manual change. Gang turning tools are 101 and up and do not require a stop, just correct offset applied which i have already done, then continue with program. So basically if old tool and new tool are both less than 101, i need a stop. If new tool is greater than 100, i dont need a stop. Also if old tool is greater than 100 and new tool is less than 101, i may or may not need a stop depending on whether or not its requesting a milling tool that was already in the milling spindle. For that i think im going to need to add a dro that stores the milling spindle tool so the script can refer to that when switching from a gang tool to milling tool.

I understand how to write most of this but have a couple questions. First of all, how do i get an m6 to run without a stop between m6 start and m6 end? Currently i have the box checked in tool change configuration for "stop spindle, wait for cycle start" which gives the stop. I assumed i would just check "automatic tool change" instead and it would just run m6 start, then m6 end, then continue with program with no stops, but it just runs m6 start and then stops. Is "automatic tool change" just eliminating m6 end and i need to put the whole macro in m6 start instead?

Once i get that figured out, what is the best way to trigger a stop and wait for cycle start in my macro? I was thinking i would just use a code "M1" and message when it meets the conditions for a needed stop, but is that the proper way to do it? I thought i read somewhere that its a bad idea to use M codes within M codes, but maybe they just meant dont call a full on macro within a macro.

Next question, the conditional stop is going to happen long after the current tool has been set to selected tool, So when running through the conditions for the stop later on, i can no longer refer to current tool as the old tool since its already been set to the new tool. If i define the current tool as "old tool" in the beginning of the macro, then set current tool to selected tool, can i later on refer to "old tool" in my conditional stop? Or does my created variable "old tool" just take on the value of selected tool when i set current tool to selected tool? Not sure if created variables get redefined when you redefine the thing they were defined by.

Still a newb at this scripting stuff, but slowly getting little bits of it.