Stephen Wille Padnos wrote:
> Jon Elson wrote:
> 
> 
>>Jeff Epler wrote:
>> 
>>
>>
>>>In emc2 there are practical limits on the precision of position values due to
>>>the use of "float" as the fundamental type for "analog" values such as
>>>encoder positions.  For instance, the values 1.0 and 1.0 + 0.5**23
>>>(approximately 1.0000001) are both exactly representable, but no values
>>>in between those two can be represented.  Similarly, 2.0 and
>>>2.0 + 0.5**22 (approximately 2.0000002) are both exactly representable,
>>>but no values in between those two can be represented.
>>>   
>>> http://en.wikipedia.org/wiki/Floating_Point#Implementation_in_actual_computers:_IEEE_floating-point
>>>  
>>>   
>>>
>>
>>A very good point!  It seems there would be a 25.4 X benefit 
>>then by using mm as the user unit instead of inches, in the case 
>>of these very high resolution encoders.  (I think you mean + 0.5 
>>* 10 ^ -23 in the above)
>>
> 
> Nope, it's 0.5 ^ 23.  0.5 is the first digit past the binary point, and 
> 0.5^23 is the last bit past the binary point.
It seems to me that :
the value 1.0 + 0.5**23   (approximately 1.0000001)
would be 5, followed by 22 zeroes, followed by 1.0, assuming 
that you mean "**23" as x 10 to the 23rd power.
This is not a number slightly larger than 1.0, unless I'm 
totally misunderstanding what you are trying to say above.
> 
> 
>> This may really be moot in Aram's 
>>project as the one million count/rev encoder would provide 5 
>>million counts/inch with a 5 TPI screw, and that is only about 
>>22 bits of resolution, assuming only a couple inches of travel.
>>Even if you tried to do this with a very large machine, say 100" 
>>of travel, that's only 100 X 5 X 1 million = 500 million, or 
>>about 29 bits of resolution.
>> 
>>
> 
> That's just a few bits past the mantissa of a 32-bit float, which is 24 
> bits.
> 
Umm, yeah, I had been thinking this was all carried as DOUBLE 
floats!  Definitely could be a problem with a high res encoder 
and a longer machine travel.
> 
I think the 24-bit counter is still OK for an encoder that gives 
1 million counts, or even 4 million counts/rev.  Probably would 
be OK, even with +/- 8 million counts/rev, since 24 bits
can represent +/- 8,388,607 integers.

Jon

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users

Reply via email to