CAD CAM EDM DRO - Yahoo Group Archive

Re: [CAD_CAM_EDM_DRO] Re: A Z80 guy needs help!

Posted by ccs@m...
on 2002-01-20 09:43:19 UTC
> This is a for a "G-Code in, step/direction out" project that will
> take about a year to complete. All motion is vector based and works
> on the assumption that position is the running sum of precise
> velocities, each applied for a precise period of time (1/1,024 of a
> second).

That is an interesting approach. I think you would have to be very
carefull to prevent accumulation of roundoff error - ie, you will have
to round the velocity to whatever precision you can express it in, and
then recalculate the move time so that the move total comes out
exactly right. You may still have trouble getting circles to return
to their starting point.

> For circular interpolation this would be:
>
> Xv = R sin (theta + delta) - R sin (theta)
> Yv = R cos (theta + delta) - R cos (theta)
>
> This requires solving for sin/cos in the shortest time possible to a
> 24 bit accuracy. I am using a Chebysheff polynomial expansion
> coefficients to converge the series in the fewest possible terms. For
> this I have a "roll your own" math package in assembly to do it.

If it were my project, I would implement circular moves as a sort of
on-the-fly preprocsssor which segmented the arcs into short linear
moves. Many programs use a cubic spline interpolator in their finest
trajectory planning loop, which means that the executed path is
actually a lot more rounded thea the segments because it is fit to a
simpler-to-caluclate curve through several points.

In other words, because sine and cosine are expensive, you can
calcualte them accurately at a few points and use a less expensive
approximation to interpolate between those points.

Chris Stratton

PS - if it were me, I'd prototype the algorithm on a PC, plotting the
output on screen or as postscript or something to verify that it all
works, before trying to get it running on the z80.

-------------------------------------------------
Christopher C. Stratton
Engineer, Instrument Maker, and Horn Player
ccs@... 617 628 1062
http://web.mit.edu/~stratton/www/brassbuild.html

Discussion Thread

mariss92705 2002-01-19 21:39:25 UTC A Z80 guy needs help! mariss92705 2002-01-19 21:44:04 UTC Re: A Z80 guy needs help! Russell Shaw 2002-01-19 23:22:05 UTC Re: [CAD_CAM_EDM_DRO] A Z80 guy needs help! Carol & Jerry Jankura 2002-01-20 06:28:52 UTC RE: [CAD_CAM_EDM_DRO] Re: A Z80 guy needs help! mariss92705 2002-01-20 09:25:22 UTC Re: A Z80 guy needs help! ccs@m... 2002-01-20 09:43:19 UTC Re: [CAD_CAM_EDM_DRO] Re: A Z80 guy needs help! Bill Vance 2002-01-20 12:37:01 UTC Re: [CAD_CAM_EDM_DRO] Re: A Z80 guy needs help! Bill Vance 2002-01-20 12:51:14 UTC Re: [CAD_CAM_EDM_DRO] Re: A Z80 guy needs help! ccs@m... 2002-01-20 13:12:42 UTC Re: [CAD_CAM_EDM_DRO] Re: A Z80 guy needs help! mariss92705 2002-01-20 13:40:56 UTC Re: A Z80 guy needs help! mariss92705 2002-01-20 15:03:39 UTC Re: A Z80 guy needs help! Alexandre GuimarĂ£es 2002-01-20 15:28:31 UTC Re: [CAD_CAM_EDM_DRO] Re: A Z80 guy needs help! Alan Marconett KM6VV 2002-01-20 15:30:12 UTC Re: A Z80 guy needs help! Russell Shaw 2002-01-20 15:36:10 UTC Re: [CAD_CAM_EDM_DRO] Re: A Z80 guy needs help! mariss92705 2002-01-20 15:50:10 UTC Re: A Z80 guy needs help! Alan Marconett KM6VV 2002-01-21 10:48:42 UTC Re: A Z80 guy needs help! Jon Elson 2002-01-21 22:50:21 UTC Re: [CAD_CAM_EDM_DRO] Re: A Z80 guy needs help!