Machsupport Forum

Mach Discussion => VB and the development of wizards => Topic started by: benfly on July 14, 2011, 12:58:13 PM

Title: Run script when cnc cut finishes
Post by: benfly 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
Title: Re: Run script when cnc cut finishes
Post by: ger21 on July 14, 2011, 06:14:33 PM
Make it an M code and add it to the end of your g-code.
Title: Re: Run script when cnc cut finishes
Post by: BR549 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
Title: Re: Run script when cnc cut finishes
Post by: benfly on July 20, 2011, 08:43:24 PM
Awesome BR549, I'd love to see it, Thank you!
Title: Re: Run script when cnc cut finishes
Post by: BR549 on July 20, 2011, 09:01:59 PM
It is In the last message, download the TXT file

(;-) TP
Title: Re: Run script when cnc cut finishes
Post by: benfly on July 20, 2011, 10:06:54 PM
Oh duh, didn't see it, Thanks much!
Title: Re: Run script when cnc cut finishes
Post by: RWElphinstone 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!
Title: Re: Run script when cnc cut finishes
Post by: ger21 on June 08, 2016, 06:57:17 PM
Try "Ignore M calls while loading" in General Config.
Title: Re: Run script when cnc cut finishes
Post by: RWElphinstone on June 09, 2016, 12:20:13 AM
Try "Ignore M calls while loading" in General Config.

That works perfectly! Thank you sir!