Starting a cut on a specific g code line

There seems to be a lot of questions about starting a program in the middle of a file. I would like to add a few tips that may help with the confusion. When you have to stop in the middle of a long running program, and try to resume, as stated by others, you need to note which block number was active when the program was stopped.
Now you can make a copy of this file and open the file on your computer with an editor such as notepad. However, if your post processor does not output line numbering (“N” numbers), you may need a different editor such as Notepad++ which will number the lines for you. Currently, the Carveco Maker Onefinity post processor does not output line numbering, although you will see them on your controller.
Now that you have your file open, search down for the line when the program stopped. I recommend restarting a few lines before this. Check to see if this line has positions for X,Y,and Z. If any of these are missing, you need to search upwards to find the most recent position for each axis. Take note of these positions. You also need to take note of which G code is active (G0,G1,G2, or G3), and the active feedrate (F???). If your post processor outputs the active feed mode (G0,G1,G2, or G3) on every line (like the Carveco Onefinity post), then you don’t have to worry about this, but if you don’t see one of these codes, be sure to look at previous lines to see which one is active.
At this point you can delete all lines before this except for your setup codes which look something like this.

%
T1 (MSG, Insert Tool 1)
G0 G17 G20 G90 G40 G49 G64
G0 Z3.000
G0 X0.000 Y10.000 M03 S15000
M0(MSG, Click ‘Continue’ when the spindle is up to speed)

The Z3.000 above is a clearance point above your carve, if this is not high enough, change it to an appropriate number.
The X0.000 and Y10.000 should be changed to the X and Y positions that you noted where the program will resume.
After the M0 add a feedrate move to the proper Z level and feedrate (G1 Z-??? F???) that you noted.
If the next line(the line where you are resuming to) is missing the active feed mode (G1,G2 or G3) that you noted, add it to the beginning of the line.
Now you should be able to run this copy of the program to resume at this point.

This will seem overwhelming to some, and basic to others.
With a basic understanding of G-code, you can do this.
Side note: I started programming with G-code in the early 70’s, so this seems basic to me.
If any of you experienced programmers see anything that I missed, please comment and correct me or add where needed.
Like my father used to say “An expert is just a bullshitter away from home”.
I will not be offended.
Sorry for the long post. I hope it helps someone.

5 Likes