Hello Guest it is April 26, 2024, 05:34:56 AM

Author Topic: Tool back into the tool magazine?  (Read 487 times)

0 Members and 2 Guests are viewing this topic.

Tool back into the tool magazine?
« on: May 03, 2023, 01:08:47 PM »
Hello,
I am in the process of creating an M6 macro for my machine. For this I have adapted the M6 ​​Macro that comes with Mach4.
The tool change should run automatically.
But I would like the function in the macro that I automatically put the last tool back into the tool magazine after machining.
Is there a way to get this into the macro? At the moment I get an error message when I call tool 0.

Thanks & Greetings
Rene

Offline kf2qd

*
  •  148 148
    • View Profile
Re: Tool back into the tool magazine?
« Reply #1 on: June 03, 2023, 10:46:07 PM »
What happens if you end your program with M6T0? The macro only runs if you call it. Can you make a macro that runs on M30 or M02? that would call M6T0?
Re: Tool back into the tool magazine?
« Reply #2 on: June 05, 2023, 08:26:26 AM »
I made a tool change program that would put the tool up when you call and T0M6.  So Mach4 will read Tool 0.  Just put a conditional if selectedtool == 0 then...
But you should also be sure that you pick up the next tool correctly.  You don't want your carousel to move forward into the spindle expecting to grab a tool to put away... you need to have your spindle move up first (assuming it is an umbrella type tool changer).  if currentool == o then.....
As far as calling your T0M6 from a macro, I'm not sure you can do that.  You can try it; put an mc.mccntlmdiexecute("inst", CODE).
But I would probably just put the T0M6 on the block above the M30.
Chad Byrd
Re: Tool back into the tool magazine?
« Reply #3 on: June 05, 2023, 10:02:24 AM »
one point very important
when stop been press while tc or some other reason that stop the machine
ONLY movment stop.all other continiue
this mean the tool will realse and fall
you must cheack before each output activate the machine status other you will have many problems