On 25 July 2010 14:53, Schooner <[email protected]> wrote: > 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?!
Toolchanging seems to be generally done with some Classic Ladder code, though I assume it could be done easily enough with a realtime or userspace component created in comp.[1] EMC sets the pin iocontrol.0.tool-change true when a toolchange is requested by M6, and waits for the pin iocontrol.0.tool-changed to be set true before continuing. For an example using Classic Ladder see http://wiki.linuxcnc.org/emcinfo.pl?ClassicLadderExamples For documentation on writing a hal component in C that can do it see http://linuxcnc.org/docs/html/hal_comp.html Alternatively, you could do it all in G-code. (I think). Linking the tool-change pin to an MDI_COMMAND pin (see http://linuxcnc.org/docs/2.3/html/gui_halui.html#sub:MDI ) should allow you to execute a G-code subroutine automatically on M6. You would need to ensure that the subroutine sets a digital output true to indicate that it has finished, and link that to the tool-changed pin. The only issue I see is that I am not totally sure that MDI_COMMAND pins are active in auto-mode, and whether you are in Auto-mode during toolchange. -- atp ------------------------------------------------------------------------------ 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
