- Posts: 723
- Thank you received: 139
0.005 error randomly accumulating over 30.000 inch travel, solutions etc ??
- smc.collins
- Topic Author
- Offline
- Platinum Member
-
Less
More
3 years 9 months ago #263294
by smc.collins
Replied by smc.collins on topic 0.005 error randomly accumulating over 30.000 inch travel, solutions etc ??
engineering.purdue.edu/~dionysis/EE452/L...er_Guide_sprufk8.pdf
Absolutely required reading, and I have been running encoder simulations and looking over the code, it is very possible in some edge circumstances that clock alignment at high frequency's might be causing a loss of pulses or a buffer overflow in certain conditions. I have seen counting errors at very high count rates and small off periods over extended periods of time, we are talking 1,000,000 or more pulses, which is in the range of where I see trouble.
Please Log in or Create an account to join the conversation.
3 years 8 months ago #263556
by andypugh
And, more importantly, it doesn't actually use the float to store position. The accumulated encoder counts are stored in a 64 bit accumulator and then the (float) position is calculated from that every time.
I don't think that there is any scope for rounding errors in this way of doing things.
Replied by andypugh on topic 0.005 error randomly accumulating over 30.000 inch travel, solutions etc ??
But: LinuxCNC uses 64-bit doubles throughout.This is a math problem in EMC2 motion control for sure. It is also a error I have observed on my mill with boring round holes. and other oddities. I did start looking over the code for positioning logic and there is yet ANOTHER issue with the 32b float format. there's only 6.92 decimal places possible for a 32bit float,
And, more importantly, it doesn't actually use the float to store position. The accumulated encoder counts are stored in a 64 bit accumulator and then the (float) position is calculated from that every time.
I don't think that there is any scope for rounding errors in this way of doing things.
Please Log in or Create an account to join the conversation.
Time to create page: 0.184 seconds