[Color Computer] [coco] Learning MW C
gene.heskett at verizon.net
Mon Aug 14 11:53:54 EDT 2006
On Monday 14 August 2006 11:41, Andrew wrote:
>I think Joel has it spot-on with his "step 4" - if you aren't able to
>get the speed out the CoCo, you might have to drive everything with
>custom hardware. However, depending on what you are planning to do, a
>full Linux box may be overkill.
>If this were my project (and yes, I do have a far back-burner CNC
>project in mind, but with everything else I am doing, I probably won't
>get to play with it for a while), and I was going to use a CoCo, I would
>interface it with either the bit-banger serial port or the RS-232 pak.
>If I wanted to hit the widest audience (if I were to release the code
>and such), I would go with the bit-banger port. I would interface this
>to a Basic Stamp or similare microcontroller (actually, the new Parallax
>Propeller might be perfect - one core per stepper). The uC would run the
>steppers and such, so that I could send simple positioning commands in a
>serial fashion. The uC would buffer the commands as fast as they came
>in, and then feed the output to the steppers via driver circuitry just
>as Joel suggested.
>On the software side, I would either stick with OS-9/BASIC-09, or just
>use regular DECB. Regardless, the code to do this would just send the
>output down the bit-banger port, using the regular methods for either OS.
>The tricky part, and the far more interesting and useful part in my
>opinion (from a community perspective), is in the ability of the CoCo to
>read GCODE from a text file and output the proper positioning commands.
>I am sure there are some simple DOS or Linux code (or you could crib
>from the EMC code if it is open source)
It is, as it was funded by the gov, and originally developed by the NIST in
the late 80's as a way to speed up getting our nations production
facilities on a more productive footing in competition with the rest of
the world. So yes, the rs-274-d spec is public domain, and many
interpreters have been written around it, some proprietary, some now GPL'd
or under the MIT license, essentially a public domain license. Such is
the case with the emc included version.
The ensueing years have seen quite a few additions to it, one of the more
usefull ones being the ability as emc uses it, to declare and use
subroutines for repetitive tasks, which formerly had to be done inline.
Now, from your mention of the parallax propeller, I find that to be an
intrigueing idea and ultimately doable if synchronization can be achieved
between the 8 cores on terms of smooth, straight line motions at any angle
desired. emc for instance, when it encounters a 2 or more axis
simultainious move, adjusts the speed of each motor to maintain all motors
reaching their ending position at exactly the same time, effectively
drawing perfectly straight lines in 3d space. Even if one motor has to
move 8" and the other 0.003" to get there.
>to read and translate the GCODE.
>In this case, it might be simpler to stick with MW C to translate the
>code needed. Once you got that working (using whatever GCODE test cases
>there are for testing), then you could start on building a simple CAD
>program for the CoCo (I would stick with a CoCo 3 using the 640x200
>mode) that could save to DXF and GCODE. For the CAD code, I would either
>"roll my own" or base it off of Lee Adams' CADD-1.BAS program presented
>in his book "Supercharged Graphics" (ISBN 0-8306-2959-9) - which is a
>simple CAD program done in BASIC for the IBM-PC (he also shows a simple
>3D CAD program in the same book). The book, though, is likely out of
>print, unfortunately. I translated a few of his 3D graphics programs
>from a different book in the same "series", from the IBM-PC BASIC he
>uses (I think it is GWBASIC) to DECB (long time ago, not recently - I
>was in high school at the time), and they worked well. In fact,
>somewhere I still have the code. Lee Adams also had a similar series
>where all the code is C as well.
>I don't know if the CoCo could drive a CNC machine directly at a fast
>enough rate to be useful (doing everything in software). I know it can
>drive the hardware in some manner (hence the old CoCo ROS project), but
> speed is the issue when doing everything in software. If you were
>doing a custom interface via the cartridge slot and optimized the driver
>in assembly, it might be possible (I say this from seeing a very old CNC
>machine in storage at a surplus place here in Phoenix that was driven by
>an old 5120 IBM-PC - so in theory, it should be possible). I just don't
>think it would be worth it unless this was only going to be something
>for you and you alone to use. If you planned on giving this to the
>community, it would be far more useful to have a GCODE interpreter than
>a custom hardware interface, IMHO...
>-- Andrew L. Ayers
> Glendale (Phoenix), Arizona
"There are four boxes to be used in defense of liberty:
soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
Yahoo.com and AOL/TW attorneys please note, additions to the above
message by Gene Heskett are:
Copyright 2006 by Maurice Eugene Heskett, all rights reserved.
More information about the Coco