Hello Guest it is April 19, 2024, 06:09:30 AM

Author Topic: Monitoring a tool change from GCode ?  (Read 3260 times)

0 Members and 1 Guest are viewing this topic.

Offline JMF

*
  •  62 62
    • View Profile
Monitoring a tool change from GCode ?
« 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 !

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Monitoring a tool change from GCode ?
« Reply #1 on: November 05, 2014, 11:41:17 AM »
In addition to the M6 macro, which is already doing that?
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline JMF

*
  •  62 62
    • View Profile
Re: Monitoring a tool change from GCode ?
« Reply #2 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
« Last Edit: November 05, 2014, 04:54:40 PM by JMF »

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Monitoring a tool change from GCode ?
« Reply #3 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.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: Monitoring a tool change from GCode ?
« Reply #4 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.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline JMF

*
  •  62 62
    • View Profile
Re: Monitoring a tool change from GCode ?
« Reply #5 on: November 05, 2014, 05:10:20 PM »
That helps a lot, thanks !!!

    John