Re: [CAD_CAM_EDM_DRO] Re: PIC DRO Dreaming
Posted by
stratton@m...
on 2000-03-13 17:24:26 UTC
> The only issues I can think of right off would be the floating pointYou don't have to do floating point math - simply multiply it by a
> math, even if nothing more than counting clicks, and multiplying by
> .00045354, tracking everything to 5 or 6 digits, and rounding it off
> to provide the current displayed value to .0001 or whatever.
binary fraction large enough to get whatever accuracy you want.
For example, to do 1440 counts/inch and display in thousandths of an
inch you multiply by 45511 and divide by 65536 or 2^16, which is
easily accomplished by simply discarding the rightmost two bytes of
the result. With this approximation, you will be off by 2 parts per
million, which is far better than the temperature stability of the
strip, machine, or workpiece. For ten thousandths, use 455111. For
metric use 115598 and place the decimal point to be consistent with a
reading in tens of micrometers (10^-5) with an error of 1.9 ppm.
What you do need is a routine for big integer multiplies and a routine
for doing many digit binary -> BCD conversion. There are libraries of
such code on the web for most common micros, either at the
manufacuterer's site or elsewhere.
Chris
--
Christopher C. Stratton, stratton@...
Instrument Maker, Horn Player & Engineer
30 Griswold Street, Cambridge, MA 02138
http://www.mdc.net/~stratton
(617) 492-3358 home/shop
Discussion Thread
Paul Devey
2000-03-13 12:39:33 UTC
PIC DRO Dreaming
D.F.S.
2000-03-13 13:22:04 UTC
Re: [CAD_CAM_EDM_DRO] PIC DRO Dreaming
stratton@m...
2000-03-13 13:46:18 UTC
Re: [CAD_CAM_EDM_DRO] PIC DRO Dreaming
William Scalione
2000-03-13 14:19:21 UTC
Re: [CAD_CAM_EDM_DRO] PIC DRO Dreaming
Paul Devey
2000-03-13 14:20:52 UTC
Re: PIC DRO Dreaming
Ken Lowther
2000-03-13 14:25:13 UTC
Re: [CAD_CAM_EDM_DRO] PIC DRO Dreaming
Paul Devey
2000-03-13 14:25:48 UTC
Re: [CAD_CAM_EDM_DRO] PIC DRO Dreaming
D.F.S.
2000-03-13 15:24:53 UTC
Re: [CAD_CAM_EDM_DRO] Re: PIC DRO Dreaming
Paul Devey
2000-03-13 16:04:03 UTC
RE: [CAD_CAM_EDM_DRO] Re: PIC DRO Dreaming
stratton@m...
2000-03-13 17:24:26 UTC
Re: [CAD_CAM_EDM_DRO] Re: PIC DRO Dreaming
D.F.S.
2000-03-14 08:16:01 UTC
Re: [CAD_CAM_EDM_DRO] Re: PIC DRO Dreaming
Ian Wright
2000-03-14 08:53:17 UTC
Re: [CAD_CAM_EDM_DRO] PIC DRO Dreaming
D.F.S.
2000-03-14 09:02:56 UTC
Re: [CAD_CAM_EDM_DRO] Re: PIC DRO Dreaming
Paul Corner
2000-03-14 14:57:11 UTC
Re: [CAD_CAM_EDM_DRO] Re: PIC DRO Dreaming
D.F.S.
2000-03-14 15:10:53 UTC
Re: [CAD_CAM_EDM_DRO] Re: PIC DRO Dreaming