View Single Post
  #48   Report Post  
Posted to rec.crafts.metalworking
David Billington David Billington is offline
external usenet poster
 
Posts: 856
Default Some kind of macro system for G-codes, for linux

DoN. Nichols wrote:
On 2010-07-19, kelly wrote:

"Ignoramus21191" wrote in message
...

Is there some Linux based macro system for generating G codes. Say, I
wanted to mill out a rectangular pocket, or drill a bolt hole pattern
etc. I would love to use a preprocessor like macro systems for
assemblers, or C preprocessor type thing that would be eared towards
CNC machining.

I can probably do something homegrown, but would prefer to find
something that is well thought out.

Writing text files with commands does fit my personality, but I woud
prefer to be able to create my own higher level commands.

i

I only have next to no CNC knowledge, but aren't "canned" G codes used to do
this sort of thing?


Commonly -- yes. I remember in the past dumping the G-code
of the canned cycles in an Anilam control to discover how they did it,
and discovering quite a few variables which I could use for my own
purposes -- as long as I didn't call my cycles and the ones in the
system in the same program.

What I did with it was write canned cycles which plotted text
using the Hersey plotter text codes.

And before you ask -- it is all long lost through changes in job
at work (from electronics technician to unix network system
administrator) several years before I retired.

Enjoy,
DoN.


Some years ago a machinist I knew, that was having a foray into CNC,
asked me if I could write something that would produce lettering. I had
run across the Windows API function GetGlyphOutline, back in the day
when the API took up a book about 1.5" thick, and so sorted out how to
use it for the purpose. It allows you to get the outline information for
TrueType fonts. He gave me the basic G codes required and I wrote it
using basic XY moves and it worked but I only finished writing the code
the last evening he had the machine so other than a brief test it hasn't
been used since. As I recently got a Denford Triac CNC mill that I'm
converting to EMC2 I'll have to dig out the source code and get it going
again. Must also have a look and see if the equivalent functionality is
available from the X system with Linux.