Metalworking (rec.crafts.metalworking) Discuss various aspects of working with metal, such as machining, welding, metal joining, screwing, casting, hardening/tempering, blacksmithing/forging, spinning and hammer work, sheet metal work.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 17
Default Some kind of macro system for G-codes, for linux

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
  #2   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 19
Default Some kind of macro system for G-codes, for linux


"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?



  #3   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 2,600
Default Some kind of macro system for G-codes, for linux

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.

--
Email: | Voice (all times): (703) 938-4564
(too) near Washington D.C. | http://www.d-and-d.com/dnichols/DoN.html
--- Black Holes are where God is dividing by zero ---
  #4   Report Post  
Posted to rec.crafts.metalworking
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.
  #5   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 28
Default Some kind of macro system for G-codes, for linux

On 2010-07-20, David Billington wrote:
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.


truetype-tracer is the Linux program. Makes G code from font and
text.

i


  #6   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 856
Default Some kind of macro system for G-codes, for linux

Ignoramus23878 wrote:
On 2010-07-20, David Billington wrote:

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.


truetype-tracer is the Linux program. Makes G code from font and
text.

i

Thanks for the information, that'll save me having to port it.
  #7   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 33
Default Some kind of macro system for G-codes, for linux


"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.


This might be useful as a reference.
http://www.ebair.com/g-macro.htm

JC


  #8   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 130
Default Some kind of macro system for G-codes, for linux

On 7/19/2010 8:54 AM, Ignoramus21191 wrote:
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


Maybe find a free CAM software?

http://www.freebyte.com/cad/cadcam.htm
  #9   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 188
Default Some kind of macro system for G-codes, for linux

On Jul 19, 7:54*am, Ignoramus21191 ignoramus21...@NOSPAM.
21191.invalid wrote:
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


Take a look he

http://www.practicalmachinist.com/vb...entals-167395/
  #10   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 6,746
Default Some kind of macro system for G-codes, for linux


Ignoramus21191 wrote:

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


In Mach3 there are "wizards" to generate G-code for simple tasks like
the noted pocketing, bolt holes, etc. that give you a simple graphical
screen with the diagram of the operation and places to enter the various
parameters. The G-code generated by these wizards would run under EMC2
just as well as Mach3.

Really, you need to select a CAD package and a CAM package and work at
getting proficient with them. Pretty much nobody hand codes G-code these
days for anything but the simplest task, and stuff like the wizards are
also very limited though you can take the code they generate and
incorporate it into a larger program.

A proper CAD-CAM setup is vastly preferable since it allows you to
visualize the part, check everything from various angles, include
fixturing in your visualization, etc. and the CAM side handles such
headaches as cutter compensation. I use TurboCAD and SheetCAM for my CNC
work and they do a good job. SheetCAM is 2.5D, but you can generally
work around that easily enough for the typical HSM complexity project.
There is a CAM product to go with TurboCAD, but I haven't used it so I
don't know how good or bad it is.


  #11   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 17
Default Some kind of macro system for G-codes, for linux

On 2010-07-19, Pete C. wrote:

Ignoramus21191 wrote:

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


In Mach3 there are "wizards" to generate G-code for simple tasks like
the noted pocketing, bolt holes, etc. that give you a simple graphical
screen with the diagram of the operation and places to enter the various
parameters. The G-code generated by these wizards would run under EMC2
just as well as Mach3.

Really, you need to select a CAD package and a CAM package and work at
getting proficient with them. Pretty much nobody hand codes G-code these
days for anything but the simplest task, and stuff like the wizards are
also very limited though you can take the code they generate and
incorporate it into a larger program.

A proper CAD-CAM setup is vastly preferable since it allows you to
visualize the part, check everything from various angles, include
fixturing in your visualization, etc. and the CAM side handles such
headaches as cutter compensation. I use TurboCAD and SheetCAM for my CNC
work and they do a good job. SheetCAM is 2.5D, but you can generally
work around that easily enough for the typical HSM complexity project.
There is a CAM product to go with TurboCAD, but I haven't used it so I
don't know how good or bad it is.


Pete, I will definitely look in that direction. I am very firmly a
text-file and command line type of person at this stage of my life,
that's why I asked about a text file. That said, I agree that having a
GUI is often (if not always) a great plus and advantage.

i
  #12   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 6,746
Default Some kind of macro system for G-codes, for linux


Ignoramus21191 wrote:

On 2010-07-19, Pete C. wrote:

Ignoramus21191 wrote:

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


In Mach3 there are "wizards" to generate G-code for simple tasks like
the noted pocketing, bolt holes, etc. that give you a simple graphical
screen with the diagram of the operation and places to enter the various
parameters. The G-code generated by these wizards would run under EMC2
just as well as Mach3.

Really, you need to select a CAD package and a CAM package and work at
getting proficient with them. Pretty much nobody hand codes G-code these
days for anything but the simplest task, and stuff like the wizards are
also very limited though you can take the code they generate and
incorporate it into a larger program.

A proper CAD-CAM setup is vastly preferable since it allows you to
visualize the part, check everything from various angles, include
fixturing in your visualization, etc. and the CAM side handles such
headaches as cutter compensation. I use TurboCAD and SheetCAM for my CNC
work and they do a good job. SheetCAM is 2.5D, but you can generally
work around that easily enough for the typical HSM complexity project.
There is a CAM product to go with TurboCAD, but I haven't used it so I
don't know how good or bad it is.


Pete, I will definitely look in that direction. I am very firmly a
text-file and command line type of person at this stage of my life,
that's why I asked about a text file. That said, I agree that having a
GUI is often (if not always) a great plus and advantage.

i


Really, a GUI isn't an advantage here. For the wizards, it's nothing
more than a diagram that makes it easier to visualize what each
parameter you set does. The parameters could just as easily be a text
list. CAD CAM is an entirely different thing from a GUI.
  #13   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 3,146
Default Some kind of macro system for G-codes, for linux

On Jul 19, 10:08*am, Ignoramus21191 ignoramus21...@NOSPAM.
21191.invalid wrote:
...
Pete, I will definitely look in that direction. I am very firmly a
text-file and command line type of person at this stage of my life,
that's why I asked about a text file. That said, I agree that having a
GUI is often (if not always) a great plus and advantage.
i


I've written a couple of macro interpreters that fed into a program's
input parser. They are easy if the keyboard input is also handled as a
sequential string you can test once per loop pass rather than having
to wait for a key. The parser checks for the ESCape key, then nonzero
length in the macro string buffer, then any other user entry. The way
I wrote it the Null character 000 also indicated an empty buffer. I
blinked the cursor by testing whether the system time was odd or
even.

The same program can then interpret individual command lines from the
keyboard or sequences of them from a file, and pauses when you hit
ESCape.

This gives the keyboard buffer and the bits that show the Alt, Shift,
Ctrl keys etc.
http://pagesperso-orange.fr/pierreli...Data_Area.html

When you prompt to Press Any Key and the joker hits Shift, you could
fake a BSOD briefly. I randomly redefined the RGB values for Black a
few times which made the screen flash alarmingly.

jsw
  #14   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 3,146
Default Some kind of macro system for G-codes, for linux

On Jul 19, 6:50*pm, Jim Wilkins wrote:
...

I've written a couple of macro interpreters that fed into a program's
input parser. ...
jsw


I forgot to mention the Macro Active flag that could be turned off to
change settings or browse the Help menu. You could use it to step
through the G code.

I used the F1-F12 function keys to call up stored macros to display,
edit or run. They were saved as a 12 element array of variable length
strings. It was very useful to have non-executing comment lines to
title and explain the macro. The F1-12 keys could be used within
macros to call other ones. I tried to minimize reading from files to
avoid File Not Found errors.

At startup the programs read in .ini files containing custom variable
values, such as different display colors for one engineer who was
color-blind, and a saved set of macros.

BTW Drag-and-Drop works by invoking the run command with the target
filename appended to the end, so it's easy to write into programs.

jsw

  #15   Report Post  
Posted to rec.crafts.metalworking
dan dan is offline
external usenet poster
 
Posts: 354
Default Some kind of macro system for G-codes, for linux

What's that Lassie? You say that Pete C. fell down the old
rec.crafts.metalworking mine and will die if we don't mount a rescue
by Mon, 19 Jul 2010 09:01:30 -0500:

Pretty much nobody hand codes G-code these
days for anything but the simplest task, and stuff like the wizards are
also very limited though you can take the code they generate and
incorporate it into a larger program.


I hand wright all my code for a six axis lathe at work.
(faster than any software we've found)
Co-workers do the same for twin spindle/ twin turret lathes too.

The milling guys do let the CAD/CAM program generate g-code, but they
have to clean it up a lot.

--

Dan H.
northshore MA.


  #16   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 3,286
Default Some kind of macro system for G-codes, for linux



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


I'm a text kind a guy too, and don't go to CAM until it is REALLY complex.
Almost no parts that I do fit this category. I admit, I'm not fast with CAM,
so I don't use it much, which keeps me slow.

I've rolled my own master Gcode files for drilling, tapping, slotting,
facing, pocketing, etc. They all use looping and incrementing of values.
Anytime I need a pocket, for example, I just bring up my master and edit it.
I can make a hand sketch of a part and have the machine making chips in a
couple minutes - way faster than you can even sit down to CAM something.
Then I sketch the next phase of the part and write the next gcode while its
running.

I think you're better off doing these yourself. Everybody's programming
style is different and you need comment the code so you can quickly change
it for the next similar part. Gcode is really simple once you've done a
few.

Karl



  #17   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 17
Default Some kind of macro system for G-codes, for linux

On 2010-07-19, Karl Townsend wrote:


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


I'm a text kind a guy too, and don't go to CAM until it is REALLY complex.
Almost no parts that I do fit this category. I admit, I'm not fast with CAM,
so I don't use it much, which keeps me slow.

I've rolled my own master Gcode files for drilling, tapping, slotting,
facing, pocketing, etc. They all use looping and incrementing of values.
Anytime I need a pocket, for example, I just bring up my master and edit it.
I can make a hand sketch of a part and have the machine making chips in a
couple minutes - way faster than you can even sit down to CAM something.
Then I sketch the next phase of the part and write the next gcode while its
running.

I think you're better off doing these yourself. Everybody's programming
style is different and you need comment the code so you can quickly change
it for the next similar part. Gcode is really simple once you've done a
few.


Karl, thanks for understanding. I am kind of going this way now
myself. I am sketching out some perl modules for doing that sort of
thing (defining macros etc). I will not go in real depth until I get a
better hang of using g-code in real life. If I do write perl modules,
I will release them as open source software.

i
  #18   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 1,475
Default Some kind of macro system for G-codes, for linux

On Mon, 19 Jul 2010 10:26:38 -0500, Ignoramus21191
wrote:

On 2010-07-19, Karl Townsend wrote:


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


I'm a text kind a guy too, and don't go to CAM until it is REALLY complex.
Almost no parts that I do fit this category. I admit, I'm not fast with CAM,
so I don't use it much, which keeps me slow.

I've rolled my own master Gcode files for drilling, tapping, slotting,
facing, pocketing, etc. They all use looping and incrementing of values.
Anytime I need a pocket, for example, I just bring up my master and edit it.
I can make a hand sketch of a part and have the machine making chips in a
couple minutes - way faster than you can even sit down to CAM something.
Then I sketch the next phase of the part and write the next gcode while its
running.

I think you're better off doing these yourself. Everybody's programming
style is different and you need comment the code so you can quickly change
it for the next similar part. Gcode is really simple once you've done a
few.


Karl, thanks for understanding. I am kind of going this way now
myself. I am sketching out some perl modules for doing that sort of
thing (defining macros etc). I will not go in real depth until I get a
better hang of using g-code in real life. If I do write perl modules,
I will release them as open source software.

i


The G-codes are dead simple to use for anyone who understands computer
programming and knows a bit of trig. The harder part for me is knowing
what exactly to ask the machine to do... how many times should the
drill be pulled out to clear chips etc.

I'm thinking it might be useful exercise to rewire my laser engraver
with stepper controllers and a computer to use Mach 3, since it came
with proprietary raster type software. Thanks for the inspiration,
Iggy.


  #19   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 6,746
Default Some kind of macro system for G-codes, for linux


Spehro Pefhany wrote:

On Mon, 19 Jul 2010 10:26:38 -0500, Ignoramus21191
wrote:

On 2010-07-19, Karl Townsend wrote:


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

I'm a text kind a guy too, and don't go to CAM until it is REALLY complex.
Almost no parts that I do fit this category. I admit, I'm not fast with CAM,
so I don't use it much, which keeps me slow.

I've rolled my own master Gcode files for drilling, tapping, slotting,
facing, pocketing, etc. They all use looping and incrementing of values.
Anytime I need a pocket, for example, I just bring up my master and edit it.
I can make a hand sketch of a part and have the machine making chips in a
couple minutes - way faster than you can even sit down to CAM something.
Then I sketch the next phase of the part and write the next gcode while its
running.

I think you're better off doing these yourself. Everybody's programming
style is different and you need comment the code so you can quickly change
it for the next similar part. Gcode is really simple once you've done a
few.


Karl, thanks for understanding. I am kind of going this way now
myself. I am sketching out some perl modules for doing that sort of
thing (defining macros etc). I will not go in real depth until I get a
better hang of using g-code in real life. If I do write perl modules,
I will release them as open source software.

i


The G-codes are dead simple to use for anyone who understands computer
programming and knows a bit of trig. The harder part for me is knowing
what exactly to ask the machine to do... how many times should the
drill be pulled out to clear chips etc.

I'm thinking it might be useful exercise to rewire my laser engraver
with stepper controllers and a computer to use Mach 3, since it came
with proprietary raster type software. Thanks for the inspiration,
Iggy.


If you're looking at the Mach3 route, let me recommend the components /
packages from http://candcnc.com Tom can sell you a customized package
with the components you need for your application. Presumably you'd need
an MP3000 type package with only two stepper drives, and some I/O. I'm
using the "Dragon Cut" 4 axis version to run both my plasma table and
mini mill (not at the same time, I swap cables between machines).
  #20   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 17
Default Some kind of macro system for G-codes, for linux

On 2010-07-19, Spehro Pefhany wrote:
On Mon, 19 Jul 2010 10:26:38 -0500, Ignoramus21191
wrote:

On 2010-07-19, Karl Townsend wrote:


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

I'm a text kind a guy too, and don't go to CAM until it is REALLY complex.
Almost no parts that I do fit this category. I admit, I'm not fast with CAM,
so I don't use it much, which keeps me slow.

I've rolled my own master Gcode files for drilling, tapping, slotting,
facing, pocketing, etc. They all use looping and incrementing of values.
Anytime I need a pocket, for example, I just bring up my master and edit it.
I can make a hand sketch of a part and have the machine making chips in a
couple minutes - way faster than you can even sit down to CAM something.
Then I sketch the next phase of the part and write the next gcode while its
running.

I think you're better off doing these yourself. Everybody's programming
style is different and you need comment the code so you can quickly change
it for the next similar part. Gcode is really simple once you've done a
few.


Karl, thanks for understanding. I am kind of going this way now
myself. I am sketching out some perl modules for doing that sort of
thing (defining macros etc). I will not go in real depth until I get a
better hang of using g-code in real life. If I do write perl modules,
I will release them as open source software.

i


The G-codes are dead simple to use for anyone who understands computer
programming and knows a bit of trig. The harder part for me is knowing
what exactly to ask the machine to do... how many times should the
drill be pulled out to clear chips etc.


The hard part is to be able to write G codes in a way that

1) they can be understood by reading
2) They can be easily changed, redesigned etc.

Programming languages evolved over decades to make programs readable,
changeable, modular, etc.

That's why I want to use one to generate G codes.

I'm thinking it might be useful exercise to rewire my laser engraver
with stepper controllers and a computer to use Mach 3, since it came
with proprietary raster type software. Thanks for the inspiration,


I really like having a general purpose computer on my mill. I play
music on it and can use XEmacs to edit my command files.

i


  #21   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 6,746
Default Some kind of macro system for G-codes, for linux


Ignoramus21191 wrote:

On 2010-07-19, Spehro Pefhany wrote:
On Mon, 19 Jul 2010 10:26:38 -0500, Ignoramus21191
wrote:

On 2010-07-19, Karl Townsend wrote:


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

I'm a text kind a guy too, and don't go to CAM until it is REALLY complex.
Almost no parts that I do fit this category. I admit, I'm not fast with CAM,
so I don't use it much, which keeps me slow.

I've rolled my own master Gcode files for drilling, tapping, slotting,
facing, pocketing, etc. They all use looping and incrementing of values.
Anytime I need a pocket, for example, I just bring up my master and edit it.
I can make a hand sketch of a part and have the machine making chips in a
couple minutes - way faster than you can even sit down to CAM something.
Then I sketch the next phase of the part and write the next gcode while its
running.

I think you're better off doing these yourself. Everybody's programming
style is different and you need comment the code so you can quickly change
it for the next similar part. Gcode is really simple once you've done a
few.

Karl, thanks for understanding. I am kind of going this way now
myself. I am sketching out some perl modules for doing that sort of
thing (defining macros etc). I will not go in real depth until I get a
better hang of using g-code in real life. If I do write perl modules,
I will release them as open source software.

i


The G-codes are dead simple to use for anyone who understands computer
programming and knows a bit of trig. The harder part for me is knowing
what exactly to ask the machine to do... how many times should the
drill be pulled out to clear chips etc.


The hard part is to be able to write G codes in a way that

1) they can be understood by reading
2) They can be easily changed, redesigned etc.

Programming languages evolved over decades to make programs readable,
changeable, modular, etc.

That's why I want to use one to generate G codes.


You really need to spend some time with a CAD CAM system before you put
too much effort into doing G-code generation in an unusual way. CAD
systems design parts, not tool paths, and they do that job very well.
CAM systems take that part information, apply tooling information,
cutter compensation, feed rates, etc. and produce the G-code for the CNC
controller to run. A *lot* of people have been generating G-code for
decades, and just about none of them are doing it the way you're talking
about. There is a lesson to be learned in that.
  #22   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 1,148
Default Some kind of macro system for G-codes, for linux

Ignoramus21191 wrote:

I really like having a general purpose computer on my mill. I play
music on it and can use XEmacs to edit my command files.

Huh? I sure can't hear music when my mill is running, unless I stuff
some ear buds inside my hearing protectors.

I use grpn for an HP-like calculator, emacs and sftp to move files
across the network.

Jon
  #23   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 3,444
Default Some kind of macro system for G-codes, for linux

On 7/19/2010 5:54 AM, Ignoramus21191 wrote:
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 am *way* lazier than any of you guys, so I sketch
my parts in CAD, generate offsets and export the resulting
DXFs to a program that generates G code for me (even for
simple parts like brackets and plates).

I hand edit the G code to include peck cycles and to
park the cutter in a convenient location at the end
of the program.

It works great!

I've not used any of these programs but I am sure you
could get one or more to provide a solid base for
your G code:

http://wiki.linuxcnc.org/emcinfo.pl?Cam

--Winston
  #24   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 6,746
Default Some kind of macro system for G-codes, for linux


Winston wrote:

On 7/19/2010 5:54 AM, Ignoramus21191 wrote:
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 am *way* lazier than any of you guys, so I sketch
my parts in CAD, generate offsets and export the resulting
DXFs to a program that generates G code for me (even for
simple parts like brackets and plates).


I'm with you. I needed to cut a dozen 2.5" x 4.5" rectangles from 3/8"
plate last week. I had an irregularly shaped scrap of 3/8" plate and it
took a minimal amount of time to enter the profile of that plate into my
CAD software, create one 2.5" x 4.5" rectangle, and then cut and paste
and arrange the most efficient cut pattern to fit the parts into the
most irregular portion of the plate, leaving the most useable remaining
part for future uses. A few more minutes in the CAM software to optimize
the cut path to maintain electrical connectivity to the ground clamp
until the last part, and then off to the shop to load and cut the
material.
  #25   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 3,444
Default Some kind of macro system for G-codes, for linux

On 7/19/2010 12:39 PM, Pete C. wrote:

Winston wrote:

On 7/19/2010 5:54 AM, Ignoramus21191 wrote:
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 am *way* lazier than any of you guys, so I sketch
my parts in CAD, generate offsets and export the resulting
DXFs to a program that generates G code for me (even for
simple parts like brackets and plates).


I'm with you. I needed to cut a dozen 2.5" x 4.5" rectangles from 3/8"
plate last week. I had an irregularly shaped scrap of 3/8" plate and it
took a minimal amount of time to enter the profile of that plate into my
CAD software, create one 2.5" x 4.5" rectangle, and then cut and paste
and arrange the most efficient cut pattern to fit the parts into the
most irregular portion of the plate, leaving the most useable remaining
part for future uses. A few more minutes in the CAM software to optimize
the cut path to maintain electrical connectivity to the ground clamp
until the last part, and then off to the shop to load and cut the
material.


Yes. I *always* sketch an outline of the raw material
as a layer on the drawing. It takes a few seconds on average.

rect
enter
0,0
enter
15,3
enter


It severely limits surprises. I hate surprises.

--Winston


  #26   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 1,148
Default Some kind of macro system for G-codes, for linux

Ignoramus21191 wrote:
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.

EMC2 does have such a feature, but I don't know it at all. There should
be a pull-down menu that brings up dialogs for toolpaths. I know that
bolt circles and grids are in there, and I think rect. and circular
pockets, too. Oh, this is available from the Axis GUI, i think you can
get to it from TkEMC also, but much harder.

I also have a bunch of C programs for this kind of stuff, some of them
are on my web page at http://pico-systems.com/gcode.html

I have some new ones I have not put on there, yet, such as a rectangular
cutout with ramp-down.

Jon
  #27   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 652
Default Some kind of macro system for G-codes, for linux

I put out a macro for Excel to generate G-code a while back


="N"&F4&" G01 X"&B4&" Y"&C4&" Z"&D4&" F"&E4

Put this in cell A.

Put X,Y,Z,F,Line Number in B,C,D,E,F

User math functions to increment values as needed for each. Cut and paste
from cell to cell(s).

Modify macro to suit your needs.

Cut and past column A into a text document and save with g-code extension
you use when finished.

I have not figured out how to do this macro for Open Office Calc or Quattro
Pro. If you do please publish it back.










  #28   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 1,344
Default Some kind of macro system for G-codes, for linux

Ignoramus21191 wrote:

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.


EMC2 has subroutines, math, logic, named parameters.

http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?Oword
http://wiki.linuxcnc.org/cgi-bin/emc...med_Parameters

Wes
  #29   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 2,600
Default Some kind of macro system for G-codes, for linux

On 2010-07-19, Ignoramus21191 wrote:
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.


Have you looked at the macro processor m4(1) which comes with
all unix variants?

It is certainly where I would start for this.

Enjoy,
DoN.

--
Email: | Voice (all times): (703) 938-4564
(too) near Washington D.C. | http://www.d-and-d.com/dnichols/DoN.html
--- Black Holes are where God is dividing by zero ---
  #30   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 169
Default Some kind of macro system for G-codes, for linux


"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


Does EMC2 support conversational programming? Mach3 has what are called
Wizards which are canned routines to do common tasks like the ones you
mention. You invoke one of them, which calls up a dialog box with fields
for parameters for the pocket size/depth, hole size and pattern, etc. You
fill those in and the Wizard generates the G-code for that task and sends
the code to the controller. Maybe EMC2 has something similar.



  #31   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 24
Default Some kind of macro system for G-codes, for linux

On 2010-07-22, Mike Henry 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


Does EMC2 support conversational programming? Mach3 has what are called
Wizards which are canned routines to do common tasks like the ones you
mention. You invoke one of them, which calls up a dialog box with fields
for parameters for the pocket size/depth, hole size and pattern, etc. You
fill those in and the Wizard generates the G-code for that task and sends
the code to the controller. Maybe EMC2 has something similar.


I have not seen that sort of thing. It may exist, but I am unaware. I
have not even looked at that stuff yet.

i
  #32   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 169
Default Some kind of macro system for G-codes, for linux


"Ignoramus24043" wrote in message
...
On 2010-07-22, Mike Henry 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


Does EMC2 support conversational programming? Mach3 has what are called
Wizards which are canned routines to do common tasks like the ones you
mention. You invoke one of them, which calls up a dialog box with fields
for parameters for the pocket size/depth, hole size and pattern, etc.
You
fill those in and the Wizard generates the G-code for that task and sends
the code to the controller. Maybe EMC2 has something similar.


I have not seen that sort of thing. It may exist, but I am unaware. I
have not even looked at that stuff yet.

i


Someone else mentioned that EMC2 has that capability through a utility of
some sort - maybe the name was Axis? In Mach the Wizards are routines that
can be programmed by users and made available for non-programmers to use.
Mach uses some form of Basic, I think, but EMC2 is probably a little more
advanced there.

Another advantage of Mach's Wizards is that the G-code from different ones
can be concatenated to make a variety of features on a part. You can use a
Wizard to surface the part to thickness, mill a circular pocket and then
drill a hole pattern for flange bolts. The G-code output from each routine
gets added to that from each predecesor and you end up with one program that
makes the entire part.

Mike

  #33   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 24
Default Some kind of macro system for G-codes, for linux

On 2010-07-23, Mike Henry wrote:

"Ignoramus24043" wrote in message
...
On 2010-07-22, Mike Henry 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

Does EMC2 support conversational programming? Mach3 has what are called
Wizards which are canned routines to do common tasks like the ones you
mention. You invoke one of them, which calls up a dialog box with fields
for parameters for the pocket size/depth, hole size and pattern, etc.
You
fill those in and the Wizard generates the G-code for that task and sends
the code to the controller. Maybe EMC2 has something similar.


I have not seen that sort of thing. It may exist, but I am unaware. I
have not even looked at that stuff yet.

i


Someone else mentioned that EMC2 has that capability through a utility of
some sort - maybe the name was Axis? In Mach the Wizards are routines that
can be programmed by users and made available for non-programmers to use.
Mach uses some form of Basic, I think, but EMC2 is probably a little more
advanced there.

Another advantage of Mach's Wizards is that the G-code from different ones
can be concatenated to make a variety of features on a part. You can use a
Wizard to surface the part to thickness, mill a circular pocket and then
drill a hole pattern for flange bolts. The G-code output from each routine
gets added to that from each predecesor and you end up with one program that
makes the entire part.

Mike


I am not sure if EMC2 has this sort of function.

i
  #34   Report Post  
Posted to rec.crafts.metalworking
external usenet poster
 
Posts: 169
Default Some kind of macro system for G-codes, for linux


"Ignoramus7608" wrote in message
...
On 2010-07-23, Mike Henry wrote:

"Ignoramus24043" wrote in message
...
On 2010-07-22, Mike Henry 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

Does EMC2 support conversational programming? Mach3 has what are
called
Wizards which are canned routines to do common tasks like the ones you
mention. You invoke one of them, which calls up a dialog box with
fields
for parameters for the pocket size/depth, hole size and pattern, etc.
You
fill those in and the Wizard generates the G-code for that task and
sends
the code to the controller. Maybe EMC2 has something similar.


I have not seen that sort of thing. It may exist, but I am unaware. I
have not even looked at that stuff yet.

i


Someone else mentioned that EMC2 has that capability through a utility of
some sort - maybe the name was Axis? In Mach the Wizards are routines
that
can be programmed by users and made available for non-programmers to use.
Mach uses some form of Basic, I think, but EMC2 is probably a little more
advanced there.

Another advantage of Mach's Wizards is that the G-code from different
ones
can be concatenated to make a variety of features on a part. You can use
a
Wizard to surface the part to thickness, mill a circular pocket and then
drill a hole pattern for flange bolts. The G-code output from each
routine
gets added to that from each predecesor and you end up with one program
that
makes the entire part.

Mike


I am not sure if EMC2 has this sort of function.

i


Might be worth looking into - it could either save you a lot of scratch
effort or (if the source code is available) provide a code basis for making
it work the way you think it should. Surely someone in the EMC community
can tell you what utilities or add-ons are available for EMC.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linux Zealots Exposed. The truth behind the Linux Religion. The Linux Destroyer Home Repair 22 June 17th 10 12:51 PM
Get free linux operating system CD-ROM (ubuntu forum) and its manualguide. [email protected] UK diy 1 March 21st 09 11:07 PM
What kind of CH system is this? [email protected] UK diy 8 October 17th 06 08:26 PM
Are Linux Lusers Really Displaced Locksmiths? (Foley Belsaw School of Linux Advocacy) Lisa Cottmann Home Repair 0 September 22nd 05 12:11 AM
What kind of sharpening system to buy? Mike Rinken Woodturning 32 September 28th 04 11:14 AM


All times are GMT +1. The time now is 11:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 DIYbanter.
The comments are property of their posters.
 

About Us

"It's about DIY & home improvement"