rotary tool changer- carousel

This is where you talk about Macros, show examples of your macro scripting and SHARE handy segments of script code as examples.

Re: rotary tool changer- carousel

Postby ronthomp » Thu Jul 16, 2020 5:26 pm

I am also working on a geneva wheel ATC. But I am still learning C#. The machine is a 1990 Haas VF1 with a 16 tool carosel. It has 4 functions, shuttle in, shuttle out (the slide) and cw and ccw platter rotation. The feedback switches are shuttle in, shuttle out, T1 home position and pocket at spindle position.
So the main function is turn on an output and when that switch trips, turn off that output.
https://www.youtube.com/watch?v=GhQdlIFylQ8&t=10730s
This is the tutorial I am following, but I'm only half way through. I am starting to understand some of the macros I have found. Like double is a decimal number vs int which is an integer. I now understand the array, so that'll be useful. I am still lost as to tracking the rotation. I suppose it will have to count the pulses from the last switch I mentioned.
My current endeavor is to get the power drawbar to release with the button on front of the spindle housing. It's an input to the computer. I can trip (set) the output to make it open the "chuck". For now I am using the mist function and toggling the button. One press for open and another press for close. I intend to write a macro loop with an and statement using the button input AND the vfd signal spindle stopped. The idea is a safety so the chuck can't open if the spindle is not stopped. I am concerned I may jostle the spindle during the manual tool change and make it close the chuck. I won't know until I try.
I'm looking forward to sharing progress with others on this thread.
ronthomp
 
Posts: 6
Joined: Sat Jun 20, 2020 8:36 pm

Re: rotary tool changer- carousel

Postby Toecutter » Sun May 22, 2022 7:24 am

Hi, everyone,
I am planning a chain changer and have tested the macro by Terry Parker and Arturo Duncan, so I have a problem.
I cannot call a tool as long as the tool number for the tool in the spindle is 0.
So as long as there isn't already a tool in the spindle when the program starts, I get the message "The current tool is out of range"

If I switch to manual tool change in the settings, then I enter M6T1 and switch back to ATC in the settings, the tools are also changed automatically and the macro seems to work, can someone give me a tip on what I need to change in the macro so that this can be done first tool is also fetched from the changer if there is not yet one to be placed in the spindle?

Thanks Rene
Toecutter
 
Posts: 6
Joined: Tue Jan 02, 2018 4:33 pm

Re: rotary tool changer- carousel

Postby Battwell » Tue May 24, 2022 8:45 am

if tool is zero- skip the put back code.
Uc300eth on router and mill.
UK uccnc powered machine sales. https://cncrouter.uk/atc-cnc-routers.htm
Automateanything/duzzit cnc/mercury cnc
Battwell
 
Posts: 821
Joined: Sun Sep 25, 2016 7:39 pm
Location: South Wales. Uk

Re: rotary tool changer- carousel

Postby Battwell » Tue May 24, 2022 11:22 am

if(Currenttool>0)
{

put back code here

}

this will skip the put back code if tool is zero and run it if its more than zero.
Uc300eth on router and mill.
UK uccnc powered machine sales. https://cncrouter.uk/atc-cnc-routers.htm
Automateanything/duzzit cnc/mercury cnc
Battwell
 
Posts: 821
Joined: Sun Sep 25, 2016 7:39 pm
Location: South Wales. Uk

Re: rotary tool changer- carousel

Postby Toecutter » Tue May 24, 2022 4:28 pm

Thanks for the help, it looks like it's working.
Toecutter
 
Posts: 6
Joined: Tue Jan 02, 2018 4:33 pm

Re: rotary tool changer- carousel

Postby Toecutter » Tue May 24, 2022 5:01 pm

Unfortunately it doesn't work after all, with the change you change from tool o to the first one that is needed for the work, but the next time you change, the warning is displayed again - the tool number is not between 1 and 8.
Changing tools is neither manual with the button nor via the MDI.
Toecutter
 
Posts: 6
Joined: Tue Jan 02, 2018 4:33 pm

Re: rotary tool changer- carousel

Postby Battwell » Sat May 28, 2022 8:38 am

if(Newtool <1 || Newtool >10) // Tool number is out of range, so we need to stop here...

change that line to
if( Newtool >10) // Tool number is out of range, so we need to stop here...
Uc300eth on router and mill.
UK uccnc powered machine sales. https://cncrouter.uk/atc-cnc-routers.htm
Automateanything/duzzit cnc/mercury cnc
Battwell
 
Posts: 821
Joined: Sun Sep 25, 2016 7:39 pm
Location: South Wales. Uk

Re: rotary tool changer- carousel

Postby Battwell » Sat May 28, 2022 8:45 am

you will also have to handle what you want to do when tool 0 is called to empty the spindle.
Uc300eth on router and mill.
UK uccnc powered machine sales. https://cncrouter.uk/atc-cnc-routers.htm
Automateanything/duzzit cnc/mercury cnc
Battwell
 
Posts: 821
Joined: Sun Sep 25, 2016 7:39 pm
Location: South Wales. Uk

Re: rotary tool changer- carousel

Postby Toecutter » Thu Jun 09, 2022 6:22 am

I can now change any tool, but only from 1-10, if tool 0 (no tool in the spindle) is in the software, the message "The Current TOOL # is out of range tool" comes up.

The same if I want to change back to tool 0 (tool 0 is empty spindle, put down tool)
Unfortunately, I don't know enough about writing macros and I probably won't figure it out myself.
Thanks
Greetings René
Toecutter
 
Posts: 6
Joined: Tue Jan 02, 2018 4:33 pm

Re: rotary tool changer- carousel

Postby Vmax549 » Thu Jun 09, 2022 9:13 pm

THe Macro was never designed to work with Tool0 . It is easy enought to make it recognize tool 0 BUT then you will have to add code to let it know what to do when you select tool 0.

Normaly there is not a tool 0 to deal with.

(;-) TP
Vmax549
 
Posts: 331
Joined: Sun Nov 22, 2015 3:25 am
Location: USA

PreviousNext

Return to Macros

Who is online

Users browsing this forum: No registered users and 8 guests