View Single Post
  #29   Report Post  
Posted to rec.woodworking
Morris Dovey Morris Dovey is offline
external usenet poster
 
Posts: 2,387
Default Craftsman Compucarver Machine

bent wrote:
| in a metal part even an etch-a-sketch part program can be huge,
| and even though simple, copying the code can endless, with all
| the passes, without an APT, or canned cycles, or something to
| fill it in. How long are your programs,

Typically, fewer than a thousand lines. I do make heavy use of
looping, subroutine calls, and confess to having hacked the controller
code to invoke external programs to generate part program fragments
that are executed on-the-fly and then discarded.

| what initialization scheme is required (how much code involved),

Not much - and I've written nearly all of the initialization code I'm
using today. It's not unusual for my programs to start out by
"discovering" the location (and sometimes the orientation) of the
workpiece.

| what machines can/do you use with code,

I code for a ShopBot in that company's proprietary part language -
which isn't a whole lot different from g-code except that it uses
symbolic names for both variables and line labels - and it opens up
_all_ of the machine parameters to the programmer.

I use strictly g-code for a small CNC router that I built in the shop.
If you browse around at the link below, you can see both machines (and
even some old ShopBot code).

| and how do you base the
| code (e.g. copied like the one before), and you use nothing but a
| Word Processor?

I was a programmer for a long time before I even heard of CNC.
Programmers are said to be a lazy lot - we'll work awfully hard to
avoid ever having to write a program more than once; and I'm probably
one of the laziest...

I've hacked the ShopBot control software to allow a part program to
cause the operating system to load, pass parameters to, and execute an
external program, then give control back to the original part program
so it can continue on. Typically these external programs examine the
parameters and generate a custom part program fragment in a file - and
when the original part program gets control back, it causes the
just-created code to be executed (as if it were a canned cycle or
subroutine call).

Taking this lazy approach has produced a library of re-usable code;
which means that about the only time I need to do any significant
amount of programming is when I do something that I haven't done
before. It isn't a matter of modifying old code to do new jobs in the
sense you describe - I re-use the exact same old code in a new
context.

I do my code writing with gvim, a programming editor from the Unix
world. I've set it up to do color highlighting to make different
elements of the part programs appear in different colored type. It
accepts/produces only ASCII text files.

--
Morris Dovey
DeSoto Solar
DeSoto, Iowa USA
http://www.iedu.com/DeSoto