CAD CAM EDM DRO - Yahoo Group Archive

Re: [CAD_CAM_EDM_DRO] Encoder counts/revolution

on 2002-06-14 13:44:06 UTC
In article <3D09883E.E2F1C0E7@...>, Jon Elson <elson@pico-
systems.com> writes
>Assuming your resolution is high enough, any program that uses
>floating point arithmetic (EMC, for instance) will handle this perfectly.
>Some other progams that do all the arithmetic in fixed point may have
>some odd errors that creep in at certain positions where the
>roundoff accumulates just before it is corrected. I suspect that

Not to be too picky but...

If the software has bee written appropriately, you will not have
problems. However, if home-brewing you need to watch your step a bit
(poor pun but free).

Use whatever floating point your programming language has and try the
following pseudocode.

a := 0
repeat
a := a + 0.1
until a == 10.0

Be prepared for an unpleasant surprise in most cases. the decimal value
0.1 is a recurring fraction in binary and cannot be represented exactly.
Thus tiny rounding errors will accumulate with a calculation like the
one above. There are many ways to avoid the problem but your should be
aware of it.

This has no direct bearing on the original question about encoder counts
but, if you are working in a conventional decimal system with sensible
leadscrews like 8TPI or 4mm or whatever, then why make the sums more
difficult than they need to be.

pete

Peter Harrison
http://micromouse.cannock.ac.uk/

Discussion Thread

vavaroutsos 2002-06-13 15:40:03 UTC Encoder counts/revolution JanRwl@A... 2002-06-13 20:26:42 UTC Re: [CAD_CAM_EDM_DRO] Encoder counts/revolution Jon Elson 2002-06-13 22:50:16 UTC Re: [CAD_CAM_EDM_DRO] Encoder counts/revolution Peter Harrison 2002-06-14 13:44:06 UTC Re: [CAD_CAM_EDM_DRO] Encoder counts/revolution Alan Marconett KM6VV 2002-06-14 21:25:04 UTC Re: [CAD_CAM_EDM_DRO] Encoder counts/revolution curious925072002 2002-06-16 12:13:38 UTC Re: Encoder counts/revolution Alan Marconett KM6VV 2002-06-16 14:06:28 UTC Re: [CAD_CAM_EDM_DRO] Re: Encoder counts/revolution