Welcome to the Parallax Discussion Forums, sign-up to participate.
There are several important features to note about the path control mode. First, the path point buffer
can be continuously reloaded with new points while the motor is moving. The path point buffer can
hold up to about 4 seconds worth of path data, but if a desired motion is longer than that, new points
can be added to the buffer while moving to create continuous motions of unlimited length. For some
applications, it is desirable to only keep a small amount of data in the path point buffers at any time to
allow the host to change the path on-the-fly with a minimal delay.
The second important feature is that when the PIC-SERVO SC moves from path point to path point, it
doesn’t simply jerk from one point to the next - it creates a series of intermediate path points so that it
moves to the next path point with a constant velocity. Path points are calculated as the positions
where the motor should be at either 30, 60 or 120 Hz intervals. If, for example, the host created a set
of path points at 60 Hz intervals, the PIC-SERVO SC would calculate intermediate path points at
1953.125 Hz intervals. The effect of this intermediate smoothing with a multi-axis system is that all
of the axes will move from one path point to the next along a straight-line segment. This internal
smoothing allows path points calculated by the host to be spaced much more widely apart, and
requires much less data to be sent to the PIC-SERVO SC .
The obvious question in specifying path points at a relatively low frequency is: “how accurately will
the motors be able to follow my ideal path”. In fact, for typical applications, this error is very small.
For example, let’s say we have an X-Y table with two motors and we wish to move along a circular
path. If we were to move along a 1.0” diameter circle at a speed of 1.0” per second, and we
approximated the circle by a series of straight line segments spaced at 30 Hz intervals, the maximum
error between the straight lines and a true circle would be 0.00028”. If we switched to 60 Hz
intervals, the maximum error would drop to 0.000069”. Slowing down the motion or increasing the
radius of curvature would further increase the accuracy.
Path points are downloaded are downloaded to the PIC-SER
T Chap wrote: »
As a suggestion you maybe want to consider doing circular calculations before a move and storing the path in ram or external ram. For example in the real world let's say you are running a very large arc and have a reason to pause the machine which involves a decel of x distance to a stop then to resume accel > run to completion. If you are doing the arc interpolation real time it seems like a big challenge to decel out of that move and be able to resume. If the moves are precalculated then it seems easier to decel that move and resume.
I think some cadcam software may allow to export gcode using lines only vs arcs. But my experience is it may grind to a slow pace to run many little lines compared to running an arc.
msrobots wrote: »
accel/decal is not done yet, but my current plan is to solve this by manipulating my step-counter-frequency - if needed - between movements.
msrobots wrote: »
The whole axis-controller-Demo running 9 axles is just 1,298 longs long and has still 6,877 longs free