Working out a tool changer method for mill
- garymcrobertpdx
- Offline
- Elite Member
-
- Posts: 164
- Thank you received: 1
I have been doing manual tool changes and its time to add a way to make it automatic.
I have searched the forum for ideas as how others have solved this problem but not
found an answer that works of me.
I wish to mount a tool holder rack on the mill table. When the program exicutes a
M6 Tn the Z axis will move up. The tool rack will be positioned to receive the current
tool holder the Z axis gos down deposits the tool holder in the rack. The Z axis
moves up the tool rack is repositioned to the location of Tn. The Z axiis moves
down retrieves the tool holder Tn and moves up. The mill bed then moves to
the location of the work piece and the G code continues execution.
I have contemplated several attacks on the problem but would rather not
reinvent the wheel! if some one has worked out a good way for tool change
with this sort of configuration I would like to hear from you
Please Log in or Create an account to join the conversation.
If the rack is somewhere that can be reached with normal axis moves, then you could remap M6 to a g-code sub, there is an example of this config here:
git.linuxcnc.org/gitweb?p=linuxcnc.git;a...89d8c917be31f9a1efa6
And remapping docs here:
www.linuxcnc.org/docview/devel/html/remap/structure.html
You do need to run the "master" ( ie development ) branch of LinuxCNC to get this capability, but that is available as an installable package from builbot.linuxcnc.org
Otherwise, more detail needed..
Please Log in or Create an account to join the conversation.
- garymcrobertpdx
- Offline
- Elite Member
-
- Posts: 164
- Thank you received: 1
I looked the examples over this appears not to be a simple matter and I have yet to figure out
how this method works.
The tool rack is attached to the mill xy bed; Not the most efficient method but saves having to
build a much more complicated changer mechanism.
One approach I have been mulling over is to try using the HAL user space and create a python
program to move the x,y and z axis to the tool change positions make the change then return
control back to the executing G code.
Here is the basic plan create a user HAL component that contains the python tool change program.
With the TOOL_CHANGE_AT_G30 = 1 set so that there is a predicable starting point .
M6 is executed it makes iocontrol.0.tool-change = true this is net to my user HAL component pin
which controls axis positions and velocity via HAL MUXs that I have added by unlinking and netting
the axis.n.joint-pos-cmd and axis.n. joint-vel-cmd pins.
When the tool change is done move back to TOOL_CHANGE_AT_G30 position switches the
MUXs and sets iocontrol.0.tool-changed = true. Hopefully the G code program will continue as it should.
I have no idea if this will work
Please Log in or Create an account to join the conversation.
Thanks for the info
I looked the examples over this appears not to be a simple matter and I have yet to figure out
how this method works.
It's relatively straightforward, I think.
This line in the INI:
REMAP=M6 modalgroup=6 prolog=change_prolog ngc=rack_change epilog=change_epilog
Means that any "M6" command in the G-code calls the G-code subroutine called "rack_change.ngc"
That G-code uses that fact that in the 2.6 version there are predefined parameters called things like #<_tool_selected> which tell the G-code which tool is needed.
(There are lots of these, the most useful being things like #<_x> which returns the current X-position. )
It also calls the routines called "change_prolog" before the tool change, and "change_epilog" after the tool change. The first checks that the tool number is valid and raises an error if not, the second actually tells LinuxCNC that the tool change has happened. These routines already exist, so you only need to copy the rack_change.ngc code (and modify it to suit your system)
There are a few other settings in the example INI file, to load a GladeVCP control panel for example. However, I think all the hard work has been done. You could try installing 2.6 from the buildbot and having a play around with that simulated tool changer configuration (it's a sim config, so won't actually move hardware)
Please Log in or Create an account to join the conversation.
- garymcrobertpdx
- Offline
- Elite Member
-
- Posts: 164
- Thank you received: 1
Went to buildbot.linuxcnc.org/ read the info
To use these packages on your computer, put one of these stanzas in your /etc/apt/sources.list.d/linuxcnc-buildbot.list:
Found the directory etc/apt/sources.list.d and I see a document emc2.list there it looks similar
Attempted to create a document linuxcnc-buildbot.list: to place the stanzas
deb buildbot.linuxcnc.org/ hardy master-rt
deb-src buildbot.linuxcnc.org/ hardy master-rt
into but the OS will not let me.
Some problem with permissions or something like it. Searched help but didn't find the magic incantation ???
Please Log in or Create an account to join the conversation.
Easy if you know the Linux OS otherwise a bit of a maze
Went to buildbot.linuxcnc.org/ read the info
To use these packages on your computer, put one of these stanzas in your /etc/apt/sources.list.d/linuxcnc-buildbot.list:
Found the directory etc/apt/sources.list.d and I see a document emc2.list there it looks similar
Well, the first semi-problem is that we changed the name. It is probably cleanest to update to the first "linuxCNC" rather than "EMC2" version.
That means LinuxCNC version 2.5.
wiki.linuxcnc.org/cgi-bin/wiki.pl?UpdatingTo2.5
Attempted to create a document linuxcnc-buildbot.list: to place the stanzas
deb buildbot.linuxcnc.org/ hardy master-rt
deb-src buildbot.linuxcnc.org/ hardy master-rt
into but the OS will not let me.
Ah, yes, you need root privileges. if you type
sudo gedit
at the command line then you get a version of gedit with root privileges.
Please Log in or Create an account to join the conversation.
- garymcrobertpdx
- Offline
- Elite Member
-
- Posts: 164
- Thank you received: 1
Although I did not see any references to 2.6 when I did the Master branch
part of the upgrade using "Then say "sudo apt-get update" and "sudo apt-get install linuxcnc" "
how do I know if 2.6 is installed?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
how do I know if 2.6 is installed?
If you start a config, the splash-screen has the version number.
(You might as well start the sim/remap/rack_toolchange config)
By the way: You might have lost your existing configs from the startup selection dialog. The solution is to rename ~/emc2 to ~/linuxcnc
Please Log in or Create an account to join the conversation.
- garymcrobertpdx
- Offline
- Elite Member
-
- Posts: 164
- Thank you received: 1
Please Log in or Create an account to join the conversation.