[Coco] moving files on bootup >> leading to that CNC Coco machine
robert.gault at worldnet.att.net
Sat Feb 2 05:35:33 EST 2008
George Ramsower wrote:
> Most of the inaccuracy in the total length is because of the way I was
> doing the math when I move it in such a way that leaves fractions of
> steps and those steps were getting out of sync with the real position
> and the cheap lead screws which are nothing more than "all thread
> rods". So, I'm working on converting actual, desired positions and then
> converting that number to the stepping of the motors to get to that
> point. This will help, but will not compensate for the threaded rods.
This reads like you are having problems with truncation and rounding of
math results. In general, if you can't represent an answer exactly, the
answer should be rounded off to +- half the highest precision.
For example, Basic09 uses Real numbers that can represent values
0.0000000005 units apart. So that means calculations should have a test
that in effect is:
IF INT(a) <> INT(a+0.0000000005) THEN a=a+0.0000000005
This won't be perfect but the error term for any calculation should be
minimized rather than grow with each step.
You'll get best results if you do an error analysis for all your
calculations assuming errors are additive. If the result does not have
acceptable precision, the you need to change your equations.
More information about the Coco