View Full Version : Using Excel for Gcode


itsme
02-10-2005, 02:53 AM
Hi there,

Firstly, I don't have any experience with Gcode and don't have a CNC machine (hopefully this will change in the near future...).

I have got the parametric equations for a shape that I would like to machine. I have used Excel to work out some points on this curve (720 to be exact). So now I have got 720 different (x,y) coordinates and all I really need to know is if it is possible to turn these into some nice Gcode that will make my shape?

Any thuoghts on this?

Regards
Warren

CNCgr
02-10-2005, 03:37 AM
Yes, it can be done, I've done it (BTW Excel can do 2d CNC simulation too, using a graph). You just have to add G & M commands to the coordinates you have, along with feeds etc. I guess since you have calculated distinctive points on the curves you'll be using G01 most of the time.

RotarySMP
02-10-2005, 04:25 AM
Excel is great for hand coding G code. You can use the auto fill function for generating line numbers, or filling a whole column with G's.

buscht
02-10-2005, 07:51 AM
Here's a simple excel formula example. If you can program in VBA, you can create all kinds of automated G code routines.

Let's say you want the G gode in column A, X coordinates are in column B, Y in C.

Put this formula in A1
="G01X"&B1&"Y"&"C1"&"F300"

copy this down the length of the list and manually add a "M02" at the end.

There is a little more set up than this, you have to add some commands specific to your machine, but its pretty easy.

I would then copy column A and "paste special" values to get just leave the data. Delete colums B and C, then save out as a text file.

ger21
02-10-2005, 08:31 AM
I'd put spaces before the X,Y,C and F, to make it a little more readable. jmo

="G01 X"&B1&" Y"&" C1"&" F300"

itsme
02-10-2005, 01:00 PM
Thanks everyone - it worked.

I used Excel with the line you suggested, generated some G-code and stuck it into CutViewer. I was shocked - the exact shape appeared in front of me - WOW!!! I also added in some z axis movements to make it a bit more exciting.

I have downloaded TurboCNC. I have seen that the help file has a list of g and m codes. Would this be a good place to learn all the other functions of gcode? Where has everyone else learnt about it? I think I kind of know the basics now though...

Thanks again

Regards
Warren

buscht
02-10-2005, 01:05 PM
http://www.betatechnical.com/autonc.htm

ger21
02-10-2005, 01:34 PM
You might want to download the Mach2 manual from http://www.artofcnc.ca
Lots of info in there.