[Coco] FOR REAL! Program listings on the list

Gene Heskett gene.heskett at verizon.net
Tue Sep 2 00:40:05 EDT 2008


On Monday 01 September 2008, George Ramsower wrote:
> I've been thinking of having some of you gurus look at one or more of my
>B09 programs that I use on my CNC machine to see if you can find ways to
>improve it, criticize it/them or otherwise go... WOW, I dunno, George.
>
> However, we have rules about the size of listings. I know for a fact that
>most of my routines are smaller than most of the off-topic posts here lately
>but I thought I should ask anyway.
> These listings would (if I can format them correctly) would look good in an
>email, are usually fairly small. About 4-8k.
>
> Right now, I'm struggling with straight lines that aren't 90 or 180
>degrees. The math is messing with my stepper motor routines and I'm gaining
>and losing steps, throwing the total count off and therefore I end up in the
>wrong places over large drawings with many angles to deal with. It's only a
>few thousands of an inch, but when they have to come together in the end, it
>all adds up.
>
> I working on engraving lately. This is WAY fun!
>
> Circles and arcs always come out perfectly. It's the darned straight lines
>at angles(I'm sure it's my math) that messes things up.
>
> Suggestions?
>
>George
>
You may have to learn C, and use the Kreider libraries + the extra trig.l to 
fix that George.  B09's math is most definitely NOT a double float, so never 
trust it for more than about the 5th digit to the right of the decimal point.

C's double floats are good to +-ee37 with 16 to 17 significant digits, and 
even after hundreds of iterations, probably at least 15 digits.  I haven't 
detected any decay personally, but haven't put it through any really huge 
loops either.

-- 
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)
What GOOD is a CARDBOARD suitcase ANYWAY?



More information about the Coco mailing list