Auto tool changer information

More
26 Jun 2011 17:44 #10880 by btvpimill
I have been searching and reading for about a week now, but have not found a definitve answer. Heres the problem: I have 2 tools on my machine, T1 and T2. Of course I want to change between the 2 in the gcode. As a machinists I would think I do something like T1M6, or M6T2. But clearly the question becomes how does EMC tell the machine to change tools? I have read a post that leads me to believe there is no "tool change macro". If this is not ture, I would love to know how to create or gain access to it.

Assuming it is true, I could write 2 subroutines (1 for T1 and 1 for T2). Then I think I would just CALL them? To make the subs work correctlly, I would need to write them using machine coordinates and not my current user coorinate system. How do I do that? G54? G52?

And then lastly, is there a way to pass the Tnumber to just have 1 subroutine?

Right now I think the flow I need is :

T1M6
CALL tool1_sub
run program
T2M6
CALL tool2_sub
run program.

I get that this may sound a little scattered, but my brain is a little mush from trying to figure out how to approach this. Oh, and to use sub's, do I need ngcgui?

Please Log in or Create an account to join the conversation.

More
26 Jun 2011 20:06 #10881 by andypugh
btvpimill wrote:

I have read a post that leads me to believe there is no "tool change macro". If this is not ture, I would love to know how to create or gain access to it.


There is no tool-change macro, because requirements differ too much.

What happens is that on an M6 the interpreter sets the HAL pin "tool change request" high, and halts. ("pin" is this case is a software thing, in HAL. However it could easily be linked to a physical pin.) Then when the pin "tool changed" goes high, it carries on again.
The simplest toolchanger is hal_manualtoolchange. That just brings up a dialogo box, and sets the "tool changed" pin when you close the dialog box.
The most common approach for a real toolchanger is to have a Classic Ladder (software PLC) config that runs when the tool-change-request pin goes high, but it is also possible to do it with a realtime component written in "comp". (rather like C)

and to use sub's, do I need ngcgui?

No, not at all. You can call subs freely from inside G-code, as MDI_COMMANDS, from the MDI window, from other subs.

Please Log in or Create an account to join the conversation.

More
26 Jun 2011 20:23 - 26 Jun 2011 20:40 #10883 by btvpimill
Thank you Andy. So now I am thinking, the easiest way will be to link the tool_change_request to the tool_changed pin. this way the tool table can be updated and EMC will know the correct z-offsets.

Then just use a sub for each tool. There is no fancy I/O required, it is just axis moves to get to the other tool.

I have no idea what "comp" is. and I have seen some stuff for CL, but not sure I want to go that deep into it. So the question now is can I link the pins and how to make sure the subroutines are gonna move the machine relative to the machine coordinates. ie:g0z0 needs to move to the machine Z zero, and not z touch off zero.

EDIT:
OK, I think I have found my answer, just use a G53 on each line of the SUB

BUT I need to set a W offset as well as Z for the tool length compensation. Is there a way to do this?
Last edit: 26 Jun 2011 20:40 by btvpimill.

Please Log in or Create an account to join the conversation.

More
26 Jun 2011 20:59 #10884 by cncbasher
what type of toolchanger do you have on the machine ?

Please Log in or Create an account to join the conversation.

More
26 Jun 2011 21:23 #10885 by btvpimill
its really not a tool changer in the regular sense. Its a gantry mill/4 axis hotwire. the gantry is X in mill mode, then the whole X rotates to present a hotwire bow. So when milling the bow point up, then when time to HW, a rotates and the mill is now pointing up.

So there is X,Y,V,Z,W,A. when milling YV and WZ act as fixed axis, and when hotwireing they are independent.

To change tools the code just has to raise Z,W to machine zero (g53z0w0), then bring YV home (g53y0v0), then rotate A to T1 or T2.

Easy to do. Just trying to see if now If I can use tool table for tool length comp or if I need to just use G55,G56.
I can easily set these in the Subroutines when called. It just means I can't change this as a feature when running. Although I can't imagine needing too.

Please Log in or Create an account to join the conversation.

More
26 Jun 2011 21:59 #10886 by andypugh
btvpimill wrote:

its really not a tool changer in the regular sense. Its a gantry mill/4 axis hotwire. the gantry is X in mill mode, then the whole X rotates to present a hotwire bow. So when milling the bow point up, then when time to HW, a rotates and the mill is now pointing up


You might want to consider just having two configs. My machine is a combined lathe/mill. If I start up with one config the long axis is Z, the short one Y, and the vertical one isn't used. If I start up in the other config the long axis is X, short is Y and vertical is Z.

I am pretty sure I could find a way to make axis movements happen as the config boots, if that would help you?

Alternatively, the development version of EMC2 will add the ability to call a G-code subroutine as a toolchange.

Please Log in or Create an account to join the conversation.

More
26 Jun 2011 22:08 #10887 by btvpimill
I use both tools in a single part. for instance HW the bottom of a wing, then mill out servo pockets, landing gear pockets, wing tips, then HW the other side and I have finished part. So seperate configs won't work for me (I don't think)

But I really am fine if this works:

tool1.ngc (filename of subroutine for tool 1)

otool1 sub
g53z0w0
g53y0v0
g53a172.3
g55
otool1 endsub

tool2.ngc (filename of subroutine for tool 2)

otool2 sub
g53z0w0
g53y0v0
g53a22.6
g56
otool2 endsub

Then in my partfile:

otool1 call

or

otool2 call

Seems like a simple solution, anyone see any problems?

Please Log in or Create an account to join the conversation.

More
26 Jun 2011 22:11 #10888 by andypugh
btvpimill wrote:

Seems like a simple solution, anyone see any problems?


Not in principle. It ought to just work.

Please Log in or Create an account to join the conversation.

More
26 Jun 2011 22:13 #10889 by btvpimill
I know its not elegant, but sometimes KISS is the word :)

Please Log in or Create an account to join the conversation.

More
27 Jun 2011 12:08 #10895 by andypugh
I forgot to mention (I think) that in the very latest development version there is an option to remap M6 to call a G-code routine.

I don't think there is much by way of docs yet, though.

Please Log in or Create an account to join the conversation.

Time to create page: 0.159 seconds
Powered by Kunena Forum