On 5 July 2012 15:13, John Kasunich <jmkasun...@fastmail.fm> wrote: >> It probably ought to add delta_counts * >> scale to the position, not recalculate the position from total counts.
> I respectfully disagree on this part. Counts are counts, and > integers can be accumulated indefinitely with no error. Floating > point math can be imprecise, and accumulating "counts times scale", > where scale is a float, could result in accumulating errors. I agree with your disagreement. The problem you describe is likely to particularly acute in cases where someone has a 1:3 pulley ratio and only bothers to type in the scale factor to as many significant figures as they feel necessary. What does work (and what the resolver module does) is to consider the counts delta of the 16-bit data from the Mesa card and add that to a 64-bit accumulator, then multiply that by the scale. There is still a problem if the scale has fewer significant figures than the total revs. For example engraving text, machining an OD then going back to underline the text might not work. Re-indexing and zeroing the encoder counts is likely to work better. It is worth noting that zeroing the encoder doesn't change the actual counts (rawcounts) -- atp If you can't fix it, you don't own it. http://www.ifixit.com/Manifesto ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users