Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: cgabe on November 11, 2012, 03:26:29 PM

Title: M6 Macro Simple?
Post by: cgabe on November 11, 2012, 03:26:29 PM
Newbi!  Most of the posts re M6 are about complex tool changes I just want a simple move.  When it hits M6 I want it to move to G00 X-4 Y-4 so I can change the tool , then I will jog  Z down to the new zero reference, because the new tool length is different,  then I can jog Z up to clear stock and press start.   I think it will go back and run the finish path gcode?????My Gcode comes from visual mill
All the talk about edit M6start and M6end??? The only place I can find those files is in the "Macros" subfolder but they are M6.m1s  type files and they don't even open with notepad etc.
Where do I find the M6 macro?
Can I edit it and do what I want?  Where do I save the new macro so the program will jump to the macro when it sees M6??  
I'm sure many folks have already done this, its so simple but I can't find it
Thank you in advance
Garth
Title: Re: M6 Macro Simple?
Post by: ger21 on November 11, 2012, 04:24:29 PM
The M6Start.m1s and M6End .m1s are the ones you want, in the macros\yourprofile\ folder. You can open them with Notepad or Wordpad, just right click on them and choose Open With...

Leave the M6End alone, and just change M6Start to this.

tool = GetSelectedTool()
SetCurrentTool( tool )
Code "G53 G0 X-4 Y-4"
While IsMoving
Wend


In General Config, set M6 to "Stop Spindle, Wait for Cycle Start"

Note that you should make sure your g-code has lifted the tool high enough to clear everything prior to the M6, or you may crash into something.
Title: Re: M6 Macro Simple?
Post by: cgabe on November 11, 2012, 06:56:53 PM
thank you!!!