Hello Guest it is April 19, 2024, 12:17:44 AM

Author Topic: Return tool to tool holder when finish working.  (Read 3363 times)

0 Members and 1 Guest are viewing this topic.

Return tool to tool holder when finish working.
« on: April 25, 2023, 08:23:11 AM »
Hi, first of all THANKS!

I finished to install ATC and first i need to make script work (for the moment i understand the script i started to adapt to my cnc).

I want the possibility to auto return the tool when i finish working (like add a final line in post processor).

Anyone know if mach3 have this option or variable? (or anyone have some script for return the tool to the holder, like read current tool number and return it to position).

Or i need to make a "reverse engineering" the M6start with another name and make a full scripted return macro.

Thanks and sorry for my english.

Offline Graham Waterworth

*
  • *
  •  2,672 2,672
  • Yorkshire Dales, England
    • View Profile
Re: Return tool to tool holder when finish working.
« Reply #1 on: April 25, 2023, 09:51:12 AM »
you can call T0 M6 and then the script can just put the tool way, the M6Start.m1s code may need to be modified to do it.

Post your script and we can take a look.
Without engineers the world stops
Re: Return tool to tool holder when finish working.
« Reply #2 on: April 25, 2023, 10:15:51 AM »
Thanks, in some days i post the code.

Tomorrow if my work leave me some time i start to test the M6 script and see if all work and i share the code here.

I really appreciate your time  :)
Re: Return tool to tool holder when finish working.
« Reply #3 on: April 26, 2023, 05:49:57 PM »
you can call T0 M6 and then the script can just put the tool way, the M6Start.m1s code may need to be modified to do it.

Post your script and we can take a look.

First thanks for your time.

I thinking... is easy adapt one script, but to many hours and i can't make a tool change m6start work i tried to fix and with maybe 8-10 hours only testing i doesn't find the solution (0 knowledge in programing and i stress quickly jejeje).

The problem i have is when i start the scrit in MDI and i write M6 T2, the program prompt with whats is the current toolnum because i have T00 in mach3 and i write 1 the script stop working with a "Invalid tool number request ! [Tool #].


This M6 is part of another script explained in this two videos (one with script explained, and another with video of tool change working):

https://www.youtube.com/watch?v=duULYFBjDnk
https://www.youtube.com/watch?v=SLq_s0FQ-SA

I take the M6start from this video (copying and trying to learn how it works).

If anyone can help me i really appreciate.

Offline Graham Waterworth

*
  • *
  •  2,672 2,672
  • Yorkshire Dales, England
    • View Profile
Re: Return tool to tool holder when finish working.
« Reply #4 on: April 26, 2023, 07:16:07 PM »
It looks like you have a few problems :-

1. Make sure you have 'Tool selections persistent' turned on, this will remember the current tool over power downs , see image.  Click the tool DRO on the program run screen, enter a number and press return, exit Mach3 and restart, is the tool number still set?

2. This macro is for a rack type tool changer with no return function so we need to do one for your setup.

3. We need to know the position of the first tool holder relative to the home position and the pitch spacing of the tools.  Output used for the tool release, output used for dust shoe lift if fitted.

With this info we can start and fix your problem.
Without engineers the world stops
Re: Return tool to tool holder when finish working.
« Reply #5 on: April 27, 2023, 04:01:32 AM »
Thanks i really appreciate your time and effort.

It looks like you have a few problems :-

1. Make sure you have 'Tool selections persistent' turned on, this will remember the current tool over power downs , see image.  Click the tool DRO on the program run screen, enter a number and press return, exit Mach3 and restart, is the tool number still set?

2. This macro is for a rack type tool changer with no return function so we need to do one for your setup.

3. We need to know the position of the first tool holder relative to the home position and the pitch spacing of the tools.  Output used for the tool release, output used for dust shoe lift if fitted.

With this info we can start and fix your problem.

1. You are right i activated tool persistent in my setup now (and tool number are remembered if i close mach3 or reboot computer) i post here a image of my config maybe i need to change something more.

2/3. I use a rack type but with every tool in different spacing's.

Because i need to make some "cuts" in my spoilboard for some large tools because my spindle base are low and i need to put the tool holders near the spoil-board and for avoid crushing it.

Some tools can fit and another ones (larger tools like 75mm tools) i need to put in "special" coord because my spoil-board have some spaces and the larger tools go trought this spaces (attached image of my cnc spolboard).

For this reason and dust shoe not retractable (i go to design a dust shoe compatible with my tools, for use it with a tool change without problems) i want prefer to put the coords of every tool holder manually for avoid problems and avoid to put a fixed space between tool holders and if someday i change the cuts of the spoilboard i can change individually this tool coords.

Sorry if i'm not capable to explain this situation in good terms.

In the script i put a false XYZ tool pos for test first in the air see how "emulate" a tool changes and if i see all is good i put the real coords.



When i return from work i go to test if the macro works, i think if this work i'm capable or i go to try and learn to add the inputs and outputs for security sensors of the spindle and the rack pneumatic relay (rack it's easy to add).

Thank you and sorry for my English (I'm from Barcelona).

Another time thanks for your time.

Offline Graham Waterworth

*
  • *
  •  2,672 2,672
  • Yorkshire Dales, England
    • View Profile
Re: Return tool to tool holder when finish working.
« Reply #6 on: April 27, 2023, 03:51:07 PM »
Here is the latest version of the macro.
Without engineers the world stops
Re: Return tool to tool holder when finish working.
« Reply #7 on: April 27, 2023, 04:59:44 PM »
Here is the latest version of the macro.

Is working, when i set tool nÂș 1 in mach3 and i put m6 t2 the tool 1 go to the tool holder and go to the tool 2 and take it.

Now it's night here and i can't make noise with air compresor but tomorrow i go to test it seriously and say something.

YOU ARE MY HERO jejeje

I really apreciate your time and knowledge!!
Re: Return tool to tool holder when finish working.
« Reply #8 on: April 28, 2023, 02:32:29 PM »
Another time thanks!!

I made this modifications in the code (added sensors of open collet and pneumatic tool rack).

I don't tested this code in the machine, tomorrow i think i have time to test it.

I commented a lot of things for learn and help to undestand the code.

I added 2 inputs with a "Const" and added the output of tool rack in the future i wan't to put a limit switch in the tool rack for another input and have this security check if the pneumatic tool rack doesn't move (maybe no air, electrovalve broken...).

I attach the code for make easier for you and avoid copy pastes (and lose the format of the comments).

What do you think about this "newbie trying to do something jajajajajaja".


Thanks another time!

PD: This codes when finish i go to edit correctly trying to explain what do and post the 2 versions or 3 of the code (one only making tool change, another with pneumatic tool sensors and tool rack and maybe another one without pneumatic tool rack. For trying to help another lost people like me).







« Last Edit: April 30, 2023, 06:17:14 PM by Graham Waterworth »
Re: Return tool to tool holder when finish working.
« Reply #9 on: April 29, 2023, 07:51:15 AM »
Today i have some time this morning i learn one thing about my ATC.

The sensors are for see if the collet are opened when activate the signal for open the tool.
The other one it's strange but i think it's only for see if are tool inside or not. Because i see if i move manually the spindle (rotate by hand) the signal without tool loaded activate only in some grades of the rotation. But if the tool are inside if i rotate the tool doesn't have this "problem".

For this reason i go to rebuild the security checks and i think i need to understant better the IF's, Then, end, end sub because i think i put wrong finishing for this checks.

Latter i put more news.

Pd: if it's possible you can remove the code 2.1 i post (for avoid to some ppl use it and this code are a epic fail jejeje)