On Sun, 2010-07-25 at 14:53 +0100, Schooner wrote:
> Hi Guys,
> 
> I have been searching the lists for info on setting up an ATC under EMC2.
> 
> I have found some references but nothing concrete as to how it is achieved.
> This must be quite a common requirement, but can see nothing in the 
> wikis etc about doing it.
> 
> I have an 8 station revolving tool changer, powered by a larger stepper 
> motor with a rachet and pawl arrangement to lock
> (go past pawl and reverse back against it to lock)
> I set this up simply in Mach, by writing a M6 macro, pity most other 
> things in Mach are so flaky.
> 
> Want to be able to code M6 T101 and have it turn until tool 1 is 
> selected etc.
> 
> The ATC is currently assigned to axis A, so I could just write GCode to 
> achieve the same result, but would rather it responded properly to M6.
> 
> Can anyone point me to some info or tell me the secret?!
> 
> thanks
> 
> ArcEye

There is some material here:
http://wiki.linuxcnc.org/emcinfo.pl?ToolChangerImplementation 

and here:
http://wiki.linuxcnc.org/emcinfo.pl?ClassicLadderExamples 

(but I know very little about Ladder)

The key point here is that the T and M6 words have a "wedge" in the .hal
setup. In your .hal file should be lines such as:
"...
net tool-prepare-loopback iocontrol.0.tool-prepare iocontrol.0.tool-prepared
net tool-change-start iocontrol.0.tool-change iocontrol.0.tool-prepared
..."

The prepare line connects the signal iocontrol.0.tool-prepare, which is
set true with a T word, to the signal iocontrol.0.tool-prepared your
tool change system needs to set true when the tool is in position. The
net command line shown above is the standard form for machines that
don't need a tool prepare function. The prepare signal is fed directly
to the prepared signal so EMC2 sees that the tool is prepared
immediately after a T word is invoked. For a carousel, the prepare
signal allows you to get the carousel ready for a tool change while the
old tool is still being used. For a turret, you will most likely need to
do the table rotation with the change signal, which in standard form
above, is connected directly to the changed signal. To set up your tool
changer the change/changed link needs to be broken and your change
routine inserted, such as:
"...
net tool-prepare-loopback iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
net tool-change-start iocontrol.0.tool-change => myTurretComp.0.start
net tool-change-done myTurretComp.0.done => iocontrol.0.tool-changed
..."

You will need to create the change routine, using a HAL component,
Classic Ladder, or some other script. My lathe turret component
http://www.wallacecompany.com/cnc_lathe/HNC/emc2/turret.comp 

controls four digital output signals for position_change,
position_changed, seek, and stop, which raise the table, rotate it,
check for a position match, then stop rotation and part the table. A
tool position encoder is needed for this. Without a position encoder,
you will need to initialize the tool changer at start-up and tally the
position as you go. I think it should be fairly easy to add an encoder.
Realtime motion control is stalled during the M6 tool change, so the
motion component is not available to run the stepper, but I believe
stepgen still works, or you could use a PLC or microprocessor as a
signal generator.

There are a lot more details to this, but the above should get you
started.
-- 
Kirk Wallace
http://www.wallacecompany.com/machine_shop/
http://www.wallacecompany.com/E45/index.html
California, USA


------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to