Adding Pauses to G Code Files

I had a need to add pauses between cuts to my g code files for a couple of reasons. I wanted to extend consumable life and also to allow my compressor to catch up after several cuts as it is a little undersized.

I wanted to add a short pause after each cut to keep the nozzle cool and also a longer pause every 5 cuts to allow the compressor to catch up.

I edited the files manually by adding a ‘G4 PXXX’ line after every ‘G0 Z1’ line where xxx is the pause time in seconds. This was ok to start but quickly became tedious so I built a program to do it. It creates a new gcode file based on the file the user selects, has options to add a pause after every cut, and also every n cuts. The n value and pause values can be adjusted by the user. The original gcode file is not altered:

2 Likes

you gonna have that program available to download? would like to try it out.

I actually just ran into a similar problem. My Titanium Plasma 45 leaves the air on after the torch is released(It does this to cool the tip). The super heated air would still cut or score for a about .25 inch or so as the machine was moving to the next part. I ended up modifying the Post so that it would add a property field where you could choose an after cut dwell. Throughout the G-code anytime there is a M5(torch off) it will put in a G4 PXXX where my torch will stop moving for a selectable time while the air cools down some. before setting off to the next part. I have included my code if anyone else needs a similar option.

3 Likes

You can try downloading the files from the link below. You will likely get a warning that the software comes from an unknown publisher as I wrote this myself using the free version of Visual Studio 2019.
The installer may prompt you to download dependencies such as Microsoft .NET 5.03. In fact I have no idea what the installer or the software will do on your particular machine or configuration.

Use of this software is entirely at your own risk.

https://drive.google.com/file/d/1ORwpRibTcFK8FbXse2f-zSzzmB35kcG0/view?usp=sharing

Let me know if it works for you.

1 Like

@S_Oates. I’ve been thinking I’d like something like this as well. Thanks for sharing. Downloaded it and will probably give it a try today. I will definitely let you know how it works and if it doesn’t no harm no foul.

Bob

1 Like

@S_Oates Just ran it. No problems installing and it added the pauses just fine but my Firecontrol doesn’t like the converted file (says it’s an older post processor). Oh well. Was definitely worth the try. Glad it works for you. I guess I’ll just go back to the manual option. It’s all good :grinning:

1 Like

Okay thanks. Clearly this is still a work in progress. It looks like the output files have a couple of hidden characters that are messing with firecontrol. I have deleted the link to the program for now.

You can manually make the new output file work. Sort of…

Open both the original file and the new output file in Microsoft Code.
In the new output file, select al lines except for the very first one and Ctrl+C to copy
Go to the original file, again select all lines except for the very first one and Ctrl+V to paste
Save the original file. The original file should still load ok in firecontrol but it now has the new pauses added.

It’s a hassle but it’s still better than manually entering a bunch of G4 P30 entries every 5th cut etc.

2 Likes

Ah yes. Good old copy paste :grinning:
Will give it a shot. Thanks again.

1 Like

Actually I’ve since found the issue in the software and corrected it. Firecontrol apparently wants ASCII files and the program was initially generating the g code text files in a different encoding format. That has been fixed and the link is active above again now. I’ve been cutting with the output files from this all afternoon with no issues.

3 Likes

Just reloaded it and tried it again. Works great. Thanks a bunch. This will totally help with some of the pieces I’ve been wanting to do. My CFO won’t sign off on a new compressor right now. :grin: You rock! :raised_hands:

1 Like

I know the feeling…well not really…but I feel for ya!

1 Like

Yes, thanks very much for creating this… I will give it a try soon…

1 Like

I’ve been using this on all my new cuts now and I’m getting about 3 times as long out of my nozzles and electrodes so it was well worth the effort to write the program. Hopefully others get the same result.

Would this eventually allow a person to input TAP files? Or, just the NC’s?

I tested it with the crossfire pro break in program which is in the TAP format. It works fine as-is. All you need to do is select ‘All Files’ in the file dialog menu and then choose your tap file.

It will output the modified file as an .nc file but that doesn’t matter. Firecontrol recognizes both file types.

At some point I’ll edit this to display both file types in the OpenFile dialog but that’s a rainy day project.

1 Like

Hello, Just so I can be clear of my understanding on how to use this script. Using Sheetcam, I would export the g-code as normal using the Firecontrol 1.6 post processor and then open this program, import the original into the script, run it and then the result is the g-code with the dwell time?

Thanks for your time and patience

I don’t use Sheetcam, however the process you state is correct. Note also that your original g-code file is not altered. It generates a new file with ‘_pauses’ appended to the end of the file name in the same folder as the original file. This new file will contain the dwell times that you set in the main form of the program.

Also the output file has the *.nc extension, not *.tap however firecontrol will recognize both extensions.

1 Like

Thanks, I will give it a try and let you know how it works out. Will be a great equipment saver if it does. Thanks again.