Hello Guest it is December 11, 2019, 05:35:39 AM

Author Topic: Run script when cnc cut finishes  (Read 10503 times)

0 Members and 1 Guest are viewing this topic.

Run script when cnc cut finishes
« on: July 14, 2011, 12:58:13 PM »
Hello all and thank you for reading :),
 
I'm interested in having Mach 3 text/sms/message me when it's done cutting my part.  Sometimes it takes forever to cut a part and I'm OK with leaving it to cut on its own for hours (I like to leave the noisy router room and maybe watch a movie or do something in the yard, or eat some food, etc).  I have some good VB programming experience so I'm comfortable with creating a script that emails/texts/sms messages me, I just need to know how to get Mach 3 to invoke/run my script when it finishes cutting. 

Thanks again,
Ben

Offline ger21

*
  • *
  •  6,291 6,291
    • View Profile
    • The CNC Woodworker
Re: Run script when cnc cut finishes
« Reply #1 on: July 14, 2011, 06:14:33 PM »
Make it an M code and add it to the end of your 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 BR549

*
  •  6,916 6,916
    • View Profile
Re: Run script when cnc cut finishes
« Reply #2 on: July 14, 2011, 07:02:08 PM »
I have a script to do the messaging over the web or you can do it with a SMS modem.

You would insert it into the M1030 macro. That way it will text you automatically when the M30 ends the program. It works very well on LONG programs.it just buzzes your cell phone with the text message.

It can have a toggle code  so you can turn off the option when you don't need it.

I can post the code if you want it. I'll drag it out.

(;-) TP

Just a thought (;-) TP
« Last Edit: July 14, 2011, 07:13:05 PM by BR549 »
Re: Run script when cnc cut finishes
« Reply #3 on: July 20, 2011, 08:43:24 PM »
Awesome BR549, I'd love to see it, Thank you!

Offline BR549

*
  •  6,916 6,916
    • View Profile
Re: Run script when cnc cut finishes
« Reply #4 on: July 20, 2011, 09:01:59 PM »
It is In the last message, download the TXT file

(;-) TP
Re: Run script when cnc cut finishes
« Reply #5 on: July 20, 2011, 10:06:54 PM »
Oh duh, didn't see it, Thanks much!
Re: Run script when cnc cut finishes
« Reply #6 on: June 08, 2016, 03:33:51 PM »
I know this has been a long time since the last post, however, I've implemented this code and it works amazingly well. One question. Is there a way that Mach3 only runs the M1030 code AFTER the cut is complete? Presently, the code runs at the beginning and end of a cut, and also at the beginning and end of a simulation as well. I'd welcome any thoughts! (As I also wanted to 'park' the machine at the end of the cut, and didn't want it to park at the beginning as well.)

Thanks so much!

Offline ger21

*
  • *
  •  6,291 6,291
    • View Profile
    • The CNC Woodworker
Re: Run script when cnc cut finishes
« Reply #7 on: June 08, 2016, 06:57:17 PM »
Try "Ignore M calls while loading" in General Config.
Gerry

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

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html
Re: Run script when cnc cut finishes
« Reply #8 on: June 09, 2016, 12:20:13 AM »
Try "Ignore M calls while loading" in General Config.

That works perfectly! Thank you sir!