NEWS
LinuxCNC 2.5.2 Release
There are no translations available.

LinuxCNC 2.5.2 Update Released (changelog).
 
LinuxCNC 2.5.1 Release
There are no translations available.

LinuxCNC 2.5.1 Update Released (changelog). If the Package Manager does not prompt you to upgrade see this page.

 
LinuxCNC 2.5.0 Release
There are no translations available.

New major release (changelog). See the instructions to update your system from EMC 2.4 to LinuxCNC 2.5.
 
Home Forum Configuring LinuxCNC Advanced Configuration Working out a tool changer method for mill

Welcome, Guest
Username: Password: Remember me

TOPIC: Working out a tool changer method for mill

Working out a tool changer method for mill 15 Mai 2012 18:02 #20117

Hi

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
The administrator has disabled public write access.

Re:Working out a tool changer method for mill 16 Mai 2012 02:39 #20128

  • andypugh
  • andypugh's Avatar
  • OFFLINE
  • Moderator
  • Posts: 4111
  • Thank you received: 140
  • Karma: 129
Is the rack connected to the X/Y axes, or controlled by separate actuators?

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..
The administrator has disabled public write access.

Re:Working out a tool changer method for mill 16 Mai 2012 10:11 #20152

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.

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
The administrator has disabled public write access.

Re:Working out a tool changer method for mill 16 Mai 2012 10:37 #20154

  • andypugh
  • andypugh's Avatar
  • OFFLINE
  • Moderator
  • Posts: 4111
  • Thank you received: 140
  • Karma: 129
garymcrobertpdx wrote:
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)
The administrator has disabled public write access.

Re:Working out a tool changer method for mill 16 Mai 2012 13:52 #20158

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

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 ???
The administrator has disabled public write access.

Re:Working out a tool changer method for mill 16 Mai 2012 14:00 #20159

  • andypugh
  • andypugh's Avatar
  • OFFLINE
  • Moderator
  • Posts: 4111
  • Thank you received: 140
  • Karma: 129
garymcrobertpdx wrote:
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.
The administrator has disabled public write access.
Time to create page: 1.145 seconds
Powered by Kunena Forum
© 2013 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.