Machsupport Forum

G-Code, CAD, and CAM => G-Code, CAD, and CAM discussions => Topic started by: newatcnc on November 02, 2011, 06:47:39 PM

Title: g-code from a spread sheet ?
Post by: newatcnc on November 02, 2011, 06:47:39 PM
Hi
My recent entry into CNC had a troublesome start with hardware issues but now all is working I am having great success using Vectric 2d and meshcam software. I have several CNC components complete and enjoying the experience.

Now I am getting interested in how to write gcode, I can see some future projects with geometry that can be calculated from formulae, one such being roughing out a multi throw crankshaft on the mill for example.

Now, I don't know if this is a silly question but is it possible to generate gcode from a spread sheet and copy straight into notebook then into Mach 3? Or is it a case of painstakingly copying the calculation results into notebook line by line?

Or are there better ways? What methods are used when formulae are needed to calculate xyz and 4th axis moves?

Cheers
Nigel

Title: Re: g-code from a spread sheet ?
Post by: BR549 on November 02, 2011, 07:48:52 PM
I would ask Les over at SheetCam to write a post to do the cranks. Just draw the offset pins  and let Scam do the math AND the gcode(;-).

He did helps us with a Camshaft Grinding post. Draw the lobe and time the lobe then Scam did the rest.  

Somewhere I do have a MACRO that can generate the Crankshaft math and then WRITE the gcode file.

You can do the Gcode MATH with spreadsheets and then export it out as a text file.

(;-) TP

Title: Re: g-code from a spread sheet ?
Post by: ger21 on November 02, 2011, 08:42:24 PM
If you know VBA, you can write a macro for Excel to export g-code directly from your spreadsheet.
Title: Re: g-code from a spread sheet ?
Post by: RICH on November 03, 2011, 06:18:12 AM
There is an article in last Digital Machinist on how to use CAD to assist in writing the Gcode.
A friend of mine has written programs that will take the dxf info and convert it to a spread sheet and then creates the
Gcode. It works quite well for both the lathe and mill, but , i must say, that in the end, one can use a relatively inexpensive
program and get to the end quicker. Different stokes for different folks..........

RICH

Title: Re: g-code from a spread sheet ?
Post by: newatcnc on November 03, 2011, 11:11:12 AM
Hi Guys
Thanks for your replies, VBA is beyond me at the moment but I wold like to learn more about this not just for cnc.

Anyway, I found some info in this forum which pointed me in the right direction for what I am thinking, it's simple really, just build up a text string in column A, make column B your calc for X, C your calc for Y etc.

Make column A ="G01X"&B1&"Y"&C1&"Z"&D1&"F50", and so on, drag it all down, then you can paste column A into Note pad and finish of the rest. I guess you could build quite sophisticated spreadsheet if you wanted.

Cheers
Nigel