[Color Computer] [coco] Learning MW C
Gene Heskett
gene.heskett at verizon.net
Sun Aug 13 21:13:50 EDT 2006
On Sunday 13 August 2006 19:26, George's Coco Address wrote:
I tried to reply to you, but it appears there's no way to pick your address
out of the posting, George, so this goes to the list.
What I'm gonna say isn't really kosher on the coco lists, but that speed is
the biggest single reason I'm going to go out on a limb and tell you to
find a suitable box to run linux on, something with at least a 400 mhz
cpu, 256megs or more memory, and at least an old 4GB or larger hard drive
and a working parallel port. With a monitor you can look at comfortably,
and if that mobo has builtin video, disable it in favor of an after market
el-cheapo nvidia card. The problem is the onboard video tends to shoot
the machine in the heart when trying to do realtime work, the offboard
card won't.
Download, burn to a cd, the kubuntu-6.06.1 LTS release. Put it in the
cdrom drive, set the bios to boot from the cdrom 1st or 2nd, and let it
boot. It will boot to a "live cd" environment, and when the gui gets
started, there will be an install icon on the screen. Click it, and fill
in the blanks to install it, blowing away any M$ stuff that might be on
that old drive. When done, reboot. With an ethernet cable plugged in, run
from a shell "sudo adept" which will ask you to confirm your password.
When its running, click on the reload button so it will get the latest
updates from the main ubuntu site. Then have it update all.
When thats done, fire up its browser and goto http://wiki.linuxcnc.org and
follow the links that will eventually lead you to a script that will
download and build everything you need to run EMC2-2.02 (or newer) in its
current snapshot. Reboot to the just made -magma' kernel.
Get a power supply and driver board from Xylotex & follow directions to
hook it up. He sells 3 and 4 axis versions that can deliver up to 2.5
amps, pwm regulated, from a psu up to 30 volts, to your motors. High
voltage, but regulated currents equal beaucoup faster step rates as they
overcome the motors inductance much faster. The motors aren't in any
danger from the voltage since the current regulation means there's only a
volt or so across the motors once the step has been completed.
You will now have a fully rs-274 compliant cnc mill once emc2 has been fine
tuned, capable of running those motors in the 8 step mode of the xylotex
board, very smoothly at speeds so low you aren't sure the motors are
actually moving, or at step speeds of 20,000 to 50,000 steps per second
depending on the machines cpu speed. Its mostly written in C or python,
and it will have you carving parts 6 months to a year faster than learning
C and re-inventing this particular wheel. Learn rs-274's 'gcode' instead
of C.
>There are too many replies with too many variants to respond to them all.
>Lots of good stuff, though.
>
> Since I'm ignorant about C, and only intend to use it on a Coco, I
> suppose MW C is good enough unless I run into problems.
>
> I have been developing a system to machine some small parts for my steam
>engine projects. I'm using stepping motors on what I call my "Tiny CNC" 3
> or 4 axis machine.It uses three or four stepping motors(depending on the
> application)
> It uses a dremel for the cutting. The machine is built, the interface
> is built and it works.
>
> A stepping motor requires a lot of steps to make one revolution, both
>positive and negative on each of the three phase coils to make it step
>properly.
Humm, the xylotex board is best used with 2 phase motors, 4 wire plus frame
ground. You might want to swap motors. The two phase, nema 23 sized ones
are generally 200 steps per rev, and 200+ oz/in of torque.
>In B09, I can step ONE motor at about two hundred steps/sec using only
>positive and negative voltages (square wave). Stepping more than one
> motor takes more time and therefore, slows the process. These stepping
> motors step at 1.5 degrees/step.
> The stepping motors directly drive a screw that is 36 pitch.
Yikes, even my micromill is running on 20tpi for the x & y, and 10 tpi for
the z. Untuned, I'm running in the region of 25-30 ipm.
> This
> requires 8640 steps/inch or about one inch per millennium.
For me thats 32,000 per inch x & y, -16000 for z, its a right handed
thread.
> For the most
> part, when actually cutting, the step rate is just perfect as the dremel
> can only cut so fast and it works fine. However, at times (especially
> when moving to a new location to start a new cut), it takes a long time
> to move it at this slow
>stepping rate. Should I wish to step these motors faster, I need to also
> use a modified sine wave. I figure four bits per coil could do this. Of
> course, this takes more time for the computer to do and speed is getting
> more serious.
The xylotex board does this internally, needing only a step and dir per
axis from the parent pc's parport. A huge simplification.
> The reason for my desire to learn "C" is so I can build a subroutine in
> C to do the stepping of the motors. This is why I want to discover a way
> to use the equivalent of Peek and Poke in C.
> It won't be a large subroutine by any means. My B09 subroutine is, maybe
>fifty lines of code. I figure C would be a lot faster once it's compiled.
> If it's fast enough, I intend to add some feedback from the steppers.
> The usual way is with optics. This would require some more peeks, would
> slow it down and make the process more time consuming. After that, I can
> begin learning to do the math in C and therefore, start migrating from
> B09 to C completely.
>
> If I could wrap my head around assembly, I would work with that. But
> I've tried ASM and keep failing. If I knew what I was doing wrong I
> could probably ask a question but I don't have a clue how to work it.
> I figure maybe C would be easier for me.
>
> Can a C routine be called upon from an interrupt? That would be great,
> as the optical position sensor could call on the routine. I can solder
> that one up too.
Steppers, when run within their speed limitations WILL move n inches, and
back to zero forever simply by counting the steps sent to them. No need
to actually have a set of home switches if you don't want them. I don't
have them myself. I just position the bit at what the code uses for the
0,0,0 point, zero the software, and carve.
> It seems if it isn't B09, I'm lost
>
> I NEED ....."AN IDIOT'S GUIDE TO 6809/OS9 ASSEMBLY( HOW TO WORK THE
>THING)"
>
> Then I could begin to learn the microprocessor.
>
>George
I know, the above isn't what you wanted to hear, but you will have finished
parts in hand 6 months to a year quicker doing as I suggest. It will use
up a few sheckles though as Jeff likes to get paid for his driver boards.
See them at <http://www.xylotex.com>
I figure the computer as a giveaway, rescued from its trip to the landfill,
and ubuntu-6.06.1 is of course the cost of the blank cd to put it on.
Very expensive software :) Emc2 is only the bandwidth to dl it.
I'll go back to lurking again now.
--
Cheers, Gene
"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.
Brought to you by the 6809, the 6803 and their cousins!
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ColorComputer/
<*> To unsubscribe from this group, send an email to:
ColorComputer-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the Coco
mailing list