Hello Guest it is April 16, 2024, 05:27:30 AM

Author Topic: Change default tool number when starting Mach4  (Read 679 times)

0 Members and 1 Guest are viewing this topic.

Change default tool number when starting Mach4
« on: April 12, 2022, 03:56:05 PM »
Hello,

Is there any simple way to change the tool number that is set by default when loading Mach4? Currently it is always tool number 1, but it would like it to be 0 or 99.

The reason for this is that I have an m6 macro, that performs both a manual tool change & auto tool zero, using a tool setter. When I start the machine the first time, I would always like to auto tool zero whatever tool Ill be using. In the m6 code, it will simply skip the auto tool zero; if current tool is same a selected tool. This is handy when I am running different programs using the same tool, then I don't want to auto tool zero in between programs. But if the first program I will run uses "T1" and by default Mach4 has "T1" set when started, then Ill eventually forget to change it to for example "T2" to ensure auto tool zero is not skipped.

Thanks for any support in advance!
« Last Edit: April 12, 2022, 04:04:21 PM by Kimcnc »

Offline Bill_O

*
  •  563 563
    • View Profile
Re: Change default tool number when starting Mach4
« Reply #1 on: April 13, 2022, 08:33:28 AM »
There might be an easier way but you can put some code in the plc script.
At the bottom is a section that only runs one time at startup.
You should be able just put the following line.
mc.mcToolSetCurrent(inst, 0)