Plotting Gcode using Excel

Last Updated
Sunday, 21-Apr-2002 16:29:38 EDT
Here's a method I used to examine how Gcode is going to trace a PC board that's pretty quick and uses the software I already had at hand at the time. It's not perfect, but it's optimized so you won't have problems if your Gcode has negatives, and it'll work on pretty much any Windows system out there.

Several quick steps are involved, but in all the process takes less than a couple minutes once you get the gist of what's happening.

At this point you have Gcode and you'd like to view what its x-y path will look like.
1) Open the output file using UltraEdit-32 (or other suitable text editor).
2) Remove the header of the file. This is everything up to and including "(Begin)".
3) Remove the footer of the file. Everything including and after "(Finished. Raise cutter, turn spindle off, reset.)".
4) Use the mouse to highlight the first "G0Z0.1".
5) Use the Replace function (CTRL-R) leaving the "Replace With" line empty to Replace All instances of "G0Z0.1".
6) Highlight "G1Z-0.007F1".
7) Again Replace All instances of "G1Z-0.007F1" with nothing.
8) Highlight "F10".
9) One more time, Replace All with nothing.
10) Now using the Replace All function, enter "G*X" into the "Find What" text box, and leave the "Replace With" box empty.
11) Use the Replace function to replace all "Y"s with ","s.
12) You should have something looking like this now.
Use SaveAs to save the file under a meaningful filename.
2.808500,3.490000
2.807862,3.475791
2.805953,3.461697
2.802787,3.447831
2.798394,3.434307
2.792803,3.421228
2.786063,3.408705
2.778228,3.396835
2.769362,3.385713
2.759531,3.375433
2.748823,3.366075
2.737315,3.357717
2.725106,3.350421
2.712295,3.344252
2.698980,3.339252
Now you have to import the data into Excel.
13) Open Excel and under the File menu, select Open.
14) Navigate to the file you just saved (don't forget to set "File Type" to "All Files (*.*)" or you may never see it) and select it, then click "Open".
15) Select "Delimited" file type, and click Next.
16) Make sure "Comma" is the only delimiter selected, and click Next then click Finish.
17) Now holding down the CTRL key, click on columns A and B.
18) Right-click and select "Format Cells".
19) Under Category select "Number" and set Decimal Places to 6 and click OK.
Now you're ready to plot the tool path.
20) Click on the Chart Wizard button on the tool bar.
21) Choose "XY Scatter" and the lower-righthand format and click on Next.
22) Somewhere on the chart that's produced, right-click and select "Chart Options".
23) In the Axis tab, uncheck both "Value (X) Axis" and "Value (Y) Axis".
24) In Gridlines, uncheck all boxes.
25) In Legend, uncheck "Show Legend", and click on OK.
Now you have a plot to examine of what your Gcode is doing. Be warned, it's not to any kind of scale, so it's only really useful (as in my case) to see if all the traces have been properly formed. You can however stretch and adjust the plot as needed to examine each of the traces for joins.
IF you have any questions or any contributions, please don't hesitate to email me directly, or on the list!

Scott


You are visitor number 0 to this web page.


Scott Holmes