Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Duc748 on December 27, 2010, 02:54:55 PM

Title: Putting pause in gcode?
Post by: Duc748 on December 27, 2010, 02:54:55 PM
Hi All,

I have a cutting project that is nested on 8 off 2440mm x 1220mm sheets.
Rather than load the 8 different gcode files I would rather group the gcode together, and insert a pause and a message to come up on Mach saying change sheet.
Is this at all possible?? if so can someone please help out?

Putting the g code together and inserting a pause is not the problem, its the message on mach screen i dont know how to implement this.

Rick
Title: Re: Putting pause in gcode?
Post by: BR549 on December 27, 2010, 03:33:29 PM
There are several options depending on your message needs.

Simple reminder in the MACH message window that pops up just before the hold

More pronouned VB window that pops up in the center of your screen

Dedicated Mach full screen page that defines your message.

Hope that helps(;-) TP
Title: Re: Putting pause in gcode?
Post by: Duc748 on December 27, 2010, 03:47:06 PM
Thanks for your reply, I think the 2nd option would be best.
How would i go about putting this work..where do I start?
Title: Re: Putting pause in gcode?
Post by: Hood on December 27, 2010, 04:12:39 PM
Open notepad and type something like this

MsgBox("Please change sheet then press OK")

You can then save it in the macro folder of your profile with a name of m1234.m1s or similar, then insert m1234 in the code where you want it to happen and it will pop up a box on screen than gives you that message.
I dont think you will need a M1 in the macro or code as it should be happy enough to just wait for you to press the OK but as soon as you press it it will continue I think, so make sure you have the sheet in place before pressing it ;D

Hood
Title: Re: Putting pause in gcode?
Post by: BR549 on December 27, 2010, 04:29:12 PM
Yep Hood has it. Just make sure you have moved the machine over so you have good entry to the work area Before you park the machine

BUT now you get the $20 lecture (;-) I do NOT recommend allowing the operator to get inside the machine work area during a "SOFT" hold.

Safety First, (;-) TP
Title: Re: Putting pause in gcode?
Post by: Duc748 on December 27, 2010, 04:33:00 PM
ok thanks for the advise..will try that...PS.where do I send the $20? ;D
Title: Re: Putting pause in gcode?
Post by: BR549 on December 27, 2010, 04:39:30 PM
Take yourself out for lunch (;-)

(;-) TP
Title: Re: Putting pause in gcode?
Post by: Hood on December 27, 2010, 04:48:11 PM
I agree regards the safety as well, suppose it all depends on how the sheet is loaded as to whether the operator could be in harms way, I certainly dont go near my lathe or mill unless the spindle at the minimum is hardware disabled.

Hood
Title: Re: Putting pause in gcode?
Post by: Duc748 on December 28, 2010, 10:03:20 AM
Hood,

Tried what you said..all works apart from when the gcode is loaded the script comes up before you can run the program, is there away to resolve this?
Rick
Title: Re: Putting pause in gcode?
Post by: Hood on December 28, 2010, 10:11:17 AM
I presume you have it placed in the appropriate part of the code and not at the beginning?
If so then it sounds like you are needing to go to General Config and choose "Ignore M codes whilst loading"

Hood
Title: Re: Putting pause in gcode?
Post by: Duc748 on December 28, 2010, 10:13:48 AM
Just altered it in G config and all works fine
Thanks Hood
Title: Re: Putting pause in gcode?
Post by: Hood on December 28, 2010, 10:16:03 AM
No probs :) Just make sure you keep yourself safe when loading the new sheets on the machine  :)

Hood
Title: Re: Putting pause in gcode?
Post by: derekbpcnc on December 28, 2010, 12:17:40 PM
I'll try this ....as M1 resets the cycle time counter and I like to see what the total run time is -

ATB
Derek

No probs :) Just make sure you keep yourself safe when loading the new sheets on the machine  :)

Hood