How do I, or can I start a cut on a specific line of my g code?
Hi Michael - I am not aware of any way to start the job on a specific line. You can, however, delete all the gcode before your line, upload it, and you get want you want. Make sure you keep the setup codes though - like setting absolute/relative (G90/91), imperial/metric (g20/21), etc or the gcode will not work properly.
-Tom
Thanks Tom. That is way out of my leagueā¦for now!! But I will try to figure that out.
Roger - no problem. Maybe I should have asked why you want to do this? There might be a different solution.
-Tom
In the middle of a 7+ hour cut my machine stopped and the pop up came asking if I wanted to home the machine. I think I lost power at some point, unsure, but Iām pretty sure Iāve rectified that. I dedicated a plug for the 1f only. So out of the 198,000 lines of gcode I wanted to start at 70,000
Hmmm, interesting. I think deleting the first 70K lines would be easiest. You can re-run the whole thing where the first part would be air cutting, or redo your CAM to leave out the first part if that is possible (unlikely if itās a 3D cut).
0.02
I did just rerun the entire cut, up to code # 107,000 and no issues. Since I have you attention on this matter could you explain how I would go about deleting the gcode. Mind you I am a rookie
And btw thank you so much for your time on this!!
Open your gcode file with windows notepad to view all of the code text. I would highly recommend studying and learning the G and M code commands before poking around and manually changing your code.
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.
Thank you very much I have been looking for this exact info and you explained it perfectly. Worked on my first try.
There should be a locked thread somewhere with all this general good info where it could be found easily.
Glad it helped! Iāll post a copy on the Facebook site for those who donāt check this forum.
Thanks so much friend. I am expecting my 1F in late June, have been working with Carveco Maker free 3 months to see if this is the one I will use, glad to see someone else using it here. I pretty sure I will need to pause and restart on long carves.
I just had that moment where I had to stop my program and restart. Each postprocessor uses a little bit different header. Iām in fusion 360. My original code was:
%
(1001)
(MACHINE)
( VENDOR AUTODESK)
( MODEL ONEFINITY WOODWORKER)
( DESCRIPTION THIS IS MODIFIED VERSION OF STANDARD AUTODESK 3 AXIS)
(T2 D=1.452 CR=0.792 TAPER=5DEG - ZMIN=-29.275 - TAPERED MILL)
N10 G90 G94 G17 G91.1
N15 G21
N20 G53 G0 Z0
(FINISHJENNY)
N25 (T2)
N30 S18000 M3
N32 G04 P6
N35 G54
N40 G0 X358.884 Y-0.735
N45 G43 Z15 H2
N50 G0 Z-23.705
N55 G1 Z-29.13 F333.3
N60 X358.878 Z-29.173 F3810
N65 X358.859 Z-29.212
N70 X358.829 Z-29.244
N75 X358.791 Z-29.265
N80 X358.749 Z-29.275
N85 X358.705 Z-29.271
N90 X358.665 Z-29.255
N95 X358.631 Z-29.227
ā¦
Then, I stopped the program, stopped the spindle and went to sleep. I left everything on and the spindle right in the middle of the cut. Then, loaded a new program in the AM that had this:
%
(1001)
(MACHINE)
( VENDOR AUTODESK)
( MODEL ONEFINITY WOODWORKER)
( DESCRIPTION THIS IS MODIFIED VERSION OF STANDARD AUTODESK 3 AXIS)
(T2 D=1.452 CR=0.792 TAPER=5DEG - ZMIN=-29.275 - TAPERED MILL)
N10 G90 G94 G17 G91.1
N15 G21
N20 G53 G0 Z0
(FINISHJENNY)
N25 (T2)
N30 S18000 M3
N35 G04 P6
N40 G54
N42 G1 Z-9 F200
N45 G43 Z15 H2
N45 Z-10.484 F200
N919340 X119.578 Z-10.484
N919345 X119.709 Z-10.604
N919350 X120.151 Z-11.117
N919355 X120.585 Z-11.365
ā¦
I added an F200 feedrate to just slow things down in the beginning in case there was a glitch, then I just went down in the code and added back an F3810 to punch the feedrate back up.
No problems. I was a little leary of putting the same G-code pre-amble in case it made a new offset. There isnāt a whole lot of documentation on G53. However, it restarted just fine.
Just wanted to add this post to help someone else out there who may be wondering if itās worth a stop to sleep on a big carve.