G-code program with pauses

A place to discuss and ask questions about all things Machining for Mills, Lathes, Laser, and Routers

Moderator: cnckeith

ShawnM
Posts: 2234
Joined: Fri May 24, 2019 8:34 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 7804734C6498-0401191832
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Clearwater, FL

Re: G-code program with pauses

Post by ShawnM »

One of the products I make I have edited the g-code to add a pause for me to secure the work piece after the first tool path. I draw in the hold down screw locations in my CAD file and have the machine drill them as the first tool path. This way I know there's no way to hit any random screw I might use. It drills the the holes then moves to my "park" position and waits for me to press cycle start again to continue on. I don't turn the spindle off, although I could, because it only takes a few seconds to add the screws. I press cycle and it goes back to work with the second tool path and so on.
Black Forest
Posts: 346
Joined: Thu Nov 23, 2017 1:39 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: G-code program with pauses

Post by Black Forest »

ShawnM wrote: Wed Jul 12, 2023 6:02 pm One of the products I make I have edited the g-code to add a pause for me to secure the work piece after the first tool path. I draw in the hold down screw locations in my CAD file and have the machine drill them as the first tool path. This way I know there's no way to hit any random screw I might use. It drills the the holes then moves to my "park" position and waits for me to press cycle start again to continue on. I don't turn the spindle off, although I could, because it only takes a few seconds to add the screws. I press cycle and it goes back to work with the second tool path and so on.
OK great. So how did you do it?
ShawnM
Posts: 2234
Joined: Fri May 24, 2019 8:34 am
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: 7804734C6498-0401191832
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No
Location: Clearwater, FL

Re: G-code program with pauses

Post by ShawnM »

Oh, sorry, I didn't realize you wanted the actual code, it's simply two lines.

NXXXX M56 (moves gantry to the "park" position)
NXXXX M200 "Please finish securing workpiece to spoilboard.\nPress Cycle Start to continue"

Edit the first line to move the gantry where ever you need it. I have mine move to my park position so I have full access to the table. The second M200 is a message box that pops up and tells me to secure my part and it waits for me to press cycle start to continue on with the next tool path.

If you need to stop and start the spindle you can add those lines as well. My pause is about 5 seconds so I don't bother stopping the spindle. I have a remote mounted "cycle start" button on my gantry so it all happens real quick.

I manually added this to my g-code for this one part I make. I insert these lines right after the last line of code for the first tool path. It pauses for me and then when I press cycle start it starts up again at the next line of code and finished the rest of the toolpaths.

Down and dirty but it does exactly what I need it to. Hope this works for you.
Black Forest
Posts: 346
Joined: Thu Nov 23, 2017 1:39 pm
Acorn CNC Controller: Yes
Allin1DC CNC Controller: No
Oak CNC controller: No
CNC Control System Serial Number: none
DC3IOB: No
CNC12: Yes
CNC11: No
CPU10 or CPU7: No

Re: G-code program with pauses

Post by Black Forest »

Thank you.

The solution was so simple. Just start a new file in Intercon. Go to the insert M &G codes and input what I wanted it to do. Once it warned me I could only put one M.code in a line I was off to the races. Simple as can be once you what to do. I didn't realize I could use that insert M&G code to actually write a program. Sort of like MDI but with multiple lines. All the head work done and program end functions done automatically. Cool. :D
Post Reply