This is a very powerful extension, but I'm wondering if it's the best
approach. Rather than coming up with a new meta-language for creating
G Codes, why not just add a statement that runs an external program
that outputs G Codes? That way, you can write the program in any
language you like, make use of IDEs, debuggers, or whatever, without
having to re-invent the wheel. It would work similarly to the way CGI
works for websites. The external program would simply output G Codes
to stdout.

I understand there's already the ability to run an external program
triggered by an M Code, but I don't think you can get output from that
program back into your original G Code program. (Of course, I may be
wrong about this...)

The problem with creating a new language is that you can't use any
existing tools for debugging it; you have to create everything from
scratch.

Neil

On Tue, Apr 6, 2010 at 4:01 PM, Flying Electron Inc
<[email protected]> wrote:
> Hi All,
>
> I wrote a python extension for axis that allows C language style extensions
> to the GCode if anyone wants to give it a try.
>
> http://tsemsb.blogspot.com/2010/04/cgcc-gcode-with-c-constructs.html
>
> It allows you to write code like this:
>
> // Constants
> const float X_Holes = 10;
> const float Y_Holes = 10;
>
> // Loop
> for (float y = 0; y < Y_Holes; y++) {
>    for (float x = 0; x < X_Holes; x++) {
>        if (x != y) {
>            G00 Z1
>            G00 X[x] Y[y]
>            G01 Z0 F1
>            G00 Z1
>        }
>    }
> }
>
> and it gets translated into regular GCode with o-words.
>
> Lawrence
> ------------------------------------------------------------------------------
> Download Intel&#174; Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> _______________________________________________
> Emc-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/emc-users
>



-- 
http://www.pixpopuli.com

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Emc-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to