Best approach for automatic tool change on rack
- grandixximo
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 132
- Thank you received: 5
17 Sep 2011 08:14 #13228
by grandixximo
Best approach for automatic tool change on rack was created by grandixximo
On my machine i have 16 tools change positions on two racks of 8 positions each, i want to make an automatic tool change, my spindle has a clamp controlled from one output and it can sense the tool and give me an input if the tool is in.
What i want from my tool change is for it to be easily called in the g-code with some simple command like M6 T1 or something similar, then i would like an easy way to set every XYZ coordinate of each tool change positions.
So i wonder what is the best way to write the tool change routine and in what language.
For what i've seen, there are O-Codes which are programmable and i could use some M1nn user defined code to control the spindle output and maybe M66 for the tool sensor input (i'm not sure what input number i should use), what i don't understand is where should i put the O-code file and how i should call it in my G-code, and if i can do something like O106 T2 or something similar where in the O-code file the 2 will be used to understand that i have to go take tool number two.
I have seen ladders, but i don't think i can call ladders from the g-code, and i'm not sure i can move axis with ladders or can i?
then i have seen the rack tool change patch, but it supports only one rack, i got two and i don't understand how can i add my M1nn codes to control the spindle clamp.
So as you can see i'm a little confused, please help clarify this points to me, thank you!
What i want from my tool change is for it to be easily called in the g-code with some simple command like M6 T1 or something similar, then i would like an easy way to set every XYZ coordinate of each tool change positions.
So i wonder what is the best way to write the tool change routine and in what language.
For what i've seen, there are O-Codes which are programmable and i could use some M1nn user defined code to control the spindle output and maybe M66 for the tool sensor input (i'm not sure what input number i should use), what i don't understand is where should i put the O-code file and how i should call it in my G-code, and if i can do something like O106 T2 or something similar where in the O-code file the 2 will be used to understand that i have to go take tool number two.
I have seen ladders, but i don't think i can call ladders from the g-code, and i'm not sure i can move axis with ladders or can i?
then i have seen the rack tool change patch, but it supports only one rack, i got two and i don't understand how can i add my M1nn codes to control the spindle clamp.
So as you can see i'm a little confused, please help clarify this points to me, thank you!
Please Log in or Create an account to join the conversation.
17 Sep 2011 10:44 - 17 Sep 2011 11:37 #13230
by BigJohnT
Replied by BigJohnT on topic Re:Best approach for automatic tool change on rack
grandixximo wrote:
Well you don't actually call the ladder from g-code but the Tn M6 turns on
iocontrol.0.tool-change (Bit, Out) TRUE when a tool change is requested
which you can use in your ladder to know a tool change is requested.
More info here
www.linuxcnc.org/docview/html/man/man1/io.1.html
Also, in master there is a procedure based tool change that can accommodate almost any tool changer you could imagine.
John
I have seen ladders, but i don't think i can call ladders from the g-code, and i'm not sure i can move axis with ladders or can i?
Well you don't actually call the ladder from g-code but the Tn M6 turns on
iocontrol.0.tool-change (Bit, Out) TRUE when a tool change is requested
which you can use in your ladder to know a tool change is requested.
More info here
www.linuxcnc.org/docview/html/man/man1/io.1.html
Also, in master there is a procedure based tool change that can accommodate almost any tool changer you could imagine.
John
Last edit: 17 Sep 2011 11:37 by BigJohnT.
Please Log in or Create an account to join the conversation.
- grandixximo
- Topic Author
- Offline
- Premium Member
Less
More
- Posts: 132
- Thank you received: 5
19 Sep 2011 00:05 - 19 Sep 2011 07:44 #13274
by grandixximo
Replied by grandixximo on topic Re:Best approach for automatic tool change on rack
So you are suggesting i use the ladder system to program a tool change?
I'll look into ladders a little more then, thanks for your help
For what i have seen so far, i still don't get how am i suppose to move the machine in the tool change positions with ladders....
after some tinkering and some chatting on IRC, i have come to the conclusion of doing it all by O codes, i'll read current tool from parameter #5400, i'll give my tool number and position trough the o-code and i'll write the whole ATC process in O code language or subroutine language, i'll use custom M codes for control input and output.
If i can do it i'll post the files here, if anyone is interested
I'll look into ladders a little more then, thanks for your help
For what i have seen so far, i still don't get how am i suppose to move the machine in the tool change positions with ladders....
after some tinkering and some chatting on IRC, i have come to the conclusion of doing it all by O codes, i'll read current tool from parameter #5400, i'll give my tool number and position trough the o-code and i'll write the whole ATC process in O code language or subroutine language, i'll use custom M codes for control input and output.
If i can do it i'll post the files here, if anyone is interested
Last edit: 19 Sep 2011 07:44 by grandixximo.
Please Log in or Create an account to join the conversation.
19 Sep 2011 13:55 #13292
by andypugh
Replied by andypugh on topic Re:Best approach for automatic tool change on rack
grandixximo wrote:
I can envisage a rack toolchanger HAL component that would take the current axis positions as inputs, and feed them straight through to the stepgens (or whatever) in normal mode, but over-ride the values (while lying to EMC2 about the feedback) during a toolchange.
For your application the ideal solution would be re-mappable G-codes, so that M6 TN called a G-code subroutine rather than the built-in M6 code.
There is support for this in the experimental branch of EMC2. We currently hace 2.4.6 as the released version, 2.5 as the soon-to-be-released version, and "Master", also known as 2.6 as the hairy, flaky development version. I think that the ability to re-define a G-code to be a subroutine is only included in Master.
I haven't managed to find any documentation on how you re-map a G-code.
However, looking through the source code it appears that in Master you can use
M6_COMMAND = O<subroutinename>
to define a G-code subroutine that will be called by M6. There is even a demo config which does it:
git.linuxcnc.org/gitweb?p=emc2.git;a=blo...hb=refs/heads/master
(Line 93 onwards)
If you need this feature more than you need stability, it is possible to get the bleeding-edge Master build from the buildbot:
buildbot.linuxcnc.org
I don't think it is easy to move axes with Ladder, and that is what you need to do.So you are suggesting i use the ladder system to program a tool change?
I'll look into ladders a little more then, thanks for your help
I can envisage a rack toolchanger HAL component that would take the current axis positions as inputs, and feed them straight through to the stepgens (or whatever) in normal mode, but over-ride the values (while lying to EMC2 about the feedback) during a toolchange.
For your application the ideal solution would be re-mappable G-codes, so that M6 TN called a G-code subroutine rather than the built-in M6 code.
There is support for this in the experimental branch of EMC2. We currently hace 2.4.6 as the released version, 2.5 as the soon-to-be-released version, and "Master", also known as 2.6 as the hairy, flaky development version. I think that the ability to re-define a G-code to be a subroutine is only included in Master.
I haven't managed to find any documentation on how you re-map a G-code.
However, looking through the source code it appears that in Master you can use
M6_COMMAND = O<subroutinename>
to define a G-code subroutine that will be called by M6. There is even a demo config which does it:
git.linuxcnc.org/gitweb?p=emc2.git;a=blo...hb=refs/heads/master
(Line 93 onwards)
If you need this feature more than you need stability, it is possible to get the bleeding-edge Master build from the buildbot:
buildbot.linuxcnc.org
Please Log in or Create an account to join the conversation.
Time to create page: 0.084 seconds