[Coco] FOR REAL! Program listings on the list

George Ramsower georgeramsower at gmail.com
Tue Sep 2 00:55:06 EDT 2008


----- Original Message ----- 
From: "Gene Heskett"

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

Thank you, Gene!

The problem I have now is time. I have to get this going ASAP as I have a 
chance to "Show My Stuff" at work making tags for keys.
 My current work around on the straight line problem is to make an arc with 
such a large radius, that it doesn't show in the engraving. I appears to be 
straight.
 HAH! That center point of the arc is almost in the living room or out over 
the front porch. Sometimes behind the house.
 For a working area of six by six inches, this a HUGE thing. Well, I'm 
exaggerating a little.. maybe a ten inch radius.

  In only the large, four inch letters is it possible to see the arc, if you 
look at it at an angle .

 Calculating the start and end angles is the trick in this. We're only 
talking about a few degrees. Each .01 degree is a LONG way on that small 
table.

 I'll keep plugging away and see what I can do to make it better.

 Life's too short to learn a new programming language and how to set it up, 
rewrite everything and all that. I'll stick with what I do know and die with 
that limited knowledge.


George




More information about the Coco mailing list