Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: JMF on November 05, 2014, 10:12:09 AM

Title: Monitoring a tool change from GCode ?
Post by: JMF on November 05, 2014, 10:12:09 AM
Is there a way to monitor when a tool change is called for in the running GCode, then execute a custom VB script based on that ?

Thanks !
Title: Re: Monitoring a tool change from GCode ?
Post by: ger21 on November 05, 2014, 11:41:17 AM
In addition to the M6 macro, which is already doing that?
Title: Re: Monitoring a tool change from GCode ?
Post by: JMF on November 05, 2014, 04:47:40 PM
Sorry my knowledge on this is very limited, how would I use the M6 macro ?

I'll do further checking in the forums too.

So can I put my own code in the m6start.m1s and m6end.m1s macros ?

  Thanks,
    John
Title: Re: Monitoring a tool change from GCode ?
Post by: ger21 on November 05, 2014, 04:54:41 PM
M6 is a tool change command. When Mach3 encounters an M6, it executes the M6 VB Script.
Title: Re: Monitoring a tool change from GCode ?
Post by: ger21 on November 05, 2014, 04:59:24 PM
Yes.
If you have Mach3 configure to "Stop Spindle, Wait for Cycle Start", it will run the M6Start, then wait for you to hit Cycle Start. After Cycle Start, it will run the M6End, then continue with the g-code.

If you configure Mach3 for Auto Toolchanger, then it will only run the M6Start macro, then continue running the g-code.
Title: Re: Monitoring a tool change from GCode ?
Post by: JMF on November 05, 2014, 05:10:20 PM
That helps a lot, thanks !!!

    John