G-code of Current State - Carbide Motion


(Dan Periard) #1

A useful feature might be to take the original G-code, save a backup version (g-code.original.nc), then wipe out lines as they’re completed (g-code.current.nc). That way, if the job gets interrupted, you have both the original and the current state of affairs. Alternatively, you just start a new file and write out the g-code lines to there as they’re sent to the CNC.


(Allen Shipman) #2

+1
I agree that there is a strong need for this functionality. There are probably a hundred different ways this could be accomplished, but your suggestion seems pretty straight forward and easy enough to implement.

Would love to hear what the Carbide 3D team thinks of this.


(Richard Cournoyer) #3

Guys,

Be VERY careful about starting a program at some mid point (after a disconnect issue). It’s a sure fire way to crash your shiny new Shapeoko. GCode programs have several modal codes and if they are removed (As you state write out the g-code lines…as they’re sent) and rerun, the machine will error out (best case) or crash.

If you are not familiar with modal codes (G, M F and S), spend some time reading up on them.


(Dan Periard) #4

Right on, Rich. Here’s my approach, which has yet to crash and/or destroy my Nomad. This is based upon using MeshCam, Carbide Motion, and the Nomad Pro.

I figure out how deep it’s progressed in the current stage, usually roughing, either by watching the lines, or using a set of calipers. I then look for that stage of roughing in the G-code in the comment line. I keep all of the header stuff, to ensure that the machine spins up correctly. Then I wipe out the code from the first roughing pass to the current roughing level.

Say it got to 2.5mm of depth. I take my G-code file, open it in Notepad++, and do a CTRL+F for “roughing” and just iterate through until I find that level. I then delete everything from the first roughing level down to the one I want.

This gives the machine a chance to spin up to speed, and return to its safe height above the stock. The first step after the roughing line comment moves the head to the proper point before starting its plunge.

Original file
%
(FILENAME: scrabbleAs.nc)
(STOCK/BLOCK, 130.400, 20.500, 4.500, -0.000, -0.000, 4.500)
G21
G90
(TOOL/MILL,3.1750,1.58750,19.050,0.0)
M6 T101
M3 S5357
G0X0.000Y0.000Z5.000
(Parallel Rough)
(Roughing Level Depth: -0.407)
G0X132.493Y22.370
G1A0.000Z-0.407F431.8
… etc

Modified File
%
(FILENAME: scrabbleAs.nc)
(STOCK/BLOCK, 130.400, 20.500, 4.500, -0.000, -0.000, 4.500)
G21
G90
(TOOL/MILL,3.1750,1.58750,19.050,0.0)
M6 T101
M3 S5357
G0X0.000Y0.000Z5.000
(Parallel Rough)
(Roughing Level Depth: -2.441)
G0X42.976
G1Z-1.959F1270.0
G1Z-2.034F431.8
…etc