From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Generating g-codes with matlab?
Date: Thu, 27 Feb 2014 02:00:18 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 20
Message-ID: <lem67i$9sp$>
References: <IICTe.332187$xm3.93865@attbi_s21>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1393466418 10137 (27 Feb 2014 02:00:18 GMT)
NNTP-Posting-Date: Thu, 27 Feb 2014 02:00:18 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 4942873
Xref: comp.soft-sys.matlab:810025

"Pat" <pkelecy(removethis)> wrote in message <IICTe.332187$xm3.93865@attbi_s21>...
> Hello all,
> I need to generate g-codes for some path profiles that I've generated in 
> Matlab.
> Has anyone come across any toolbox or utility for doing this from Matlab?  I 
> searched the web but (surprisingly) didn't find anything that would do it 
> directly from Matlab.
> G-code programs I've looked at don't appear that difficult, so I may just 
> write my own but thought I would check here first (and possibly avoid 
> reinventing the wheel).
> Thanks for any help/advice.
> Pat 
I used Eulers Best approximation method to do the integration along X, Y, and Z and used the points as G-Code values between desired functions. Since complex design will require a collection of multiple functions I just did each part by part. dx, dy, dx become the small increments along the tool path. Hectic but it worked as an experiment. At the end you have to output the data as excel file and edit as necessary to add other unique feature such as tool change, speed and FR.