Hello Guest it is April 19, 2024, 09:29:51 AM

Author Topic: g-code from a spread sheet ?  (Read 5348 times)

0 Members and 1 Guest are viewing this topic.

Offline newatcnc

*
  •  48 48
  • Alford, Scotland + Jurong Singapore
    • View Profile
g-code from a spread sheet ?
« 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

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: g-code from a spread sheet ?
« Reply #1 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

« Last Edit: November 02, 2011, 07:50:23 PM by BR549 »

Offline ger21

*
  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: g-code from a spread sheet ?
« Reply #2 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.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: g-code from a spread sheet ?
« Reply #3 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

Offline newatcnc

*
  •  48 48
  • Alford, Scotland + Jurong Singapore
    • View Profile
Re: g-code from a spread sheet ?
« Reply #4 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