Needing to know how to do a tool change at the end of a program

Needing to know how to do a tool change at the end of a program

Anonymous
Not applicable
797 Views
3 Replies
Message 1 of 4

Needing to know how to do a tool change at the end of a program

Anonymous
Not applicable

I need to know how to do a tool change at the end of my program.  I'm running production parts and only using one tool.  My machine whenever starting a program again automatically changes the tool to the next in the turret(it doesn't recognize there is a tool in the spindle).  Thus i need to do a tool change at the end of the program so when I start the program again it will pull up the correct tool.  

0 Likes
798 Views
3 Replies
Replies (3)
Message 2 of 4

engineguy
Mentor
Mentor

@Anonymous

 

Hi, don`t know if this is what you need but it might work for you, first, whatever Post Processor you are using make a copy of it just in case this goes all wrong Smiley Happy

 

Next open the Post in Notepad++ and use the "Search" to find the "function onClose" section of the Post.

If your Post outputs a "Return to Home" for the X and Y axis something like this :-

writeRetract (X, Y); // return to home

This probably the safest place to put the tool change as the Z axis has already Homed to it`s highest point (Machine Z zero) and the above line will take the X and Y axis to machine zero so in theory your job should be clear of the tool change, if your machines control automatically moves all axis to a "safe" tool change position then all the better Smiley Happy

Copy and paste the code below where I have indicated and it should output a T* M06 at the end of the code just before the M30 line.

It will also output a G49 tool length compensation which should clear any tool offsets.

 

disableLengthCompensation();
writeBlock("T" + toolFormat.format(tool.number), mFormat.format(6));
if (tool.comment) {
writeComment(tool.comment);
}

 

However after all that I am really not that clear on how having a tool change for the current tool at the end might help, I would have thought that no matter if the machine does a change to the next tool in the changer at the start it would have to change back to the tool that is commanded at the start of your program anyway??

 

I would be really interested to learn about this, seems a very odd configuration of a CNC control,  anyway best of luck with it Smiley Happy Smiley Happy Smiley Happy

 

P.S. Here is what the code looks like at the end of my test program ;_

 

N160 M09
N165 G28 G91 Z0.
N170 G90
N175 G49
N180 G28 G91 X0. Y0.
N185 G90
N190 T1 M06
(8MM FLAT EM-MERLIN 55 DEG)
N195 M30

 

Regards

Rob

0 Likes
Message 3 of 4

daniel_lyall
Mentor
Mentor

Are the tool numbers the same and what machine are you useing 


Win10 pro | 16 GB ram | 4 GB graphics Quadro K2200 | Intel(R) 8Xeon(R) CPU E5-1620 v3 @ 3.50GHz 3.50 GHz

Daniel Lyall
The Big Boss
Mach3 User
My Websight, Daniels Wheelchair Customisations.
Facebook | Twitter | LinkedIn

0 Likes
Message 4 of 4

Anonymous
Not applicable

Thanks for the response Rob.  I ended up just taking out the tool change in the beginning of my program so it doesn't designate a tool thus not telling the machine to go to a specific tool.  I also find this super strange that the machine "forgets" what tool is in the spindle after every program.  I just started working with this machine ( OKK VM5 with a Neomatic 635 Meldas controler).  Its very probable that this could be user error too but I had a service tech out working on it and he did mention this being an issue   

0 Likes