User's Manual

PMAC User Manual
Writing Programs for PMAC 183
PMAC also computes the velocity for each axis at each way point along the spline by taking the velocity
halfway between the average velocities of the segments on either side of the way point:
TA* 2
1)-X(n-1)+X(n
TA* 2
1)]-X(n-[X(n)+X(n)]-1)+[X(n
=V(n) =
Having computed exact positions and velocities at segment boundaries, PMAC calculates the unique
cubic position equation (parabolic velocity profile) that meets these constraints, and uses this equation for
interpolation.
The segment time may not be changed on the fly in SPLINE1 mode. If the segment time is changed in
the middle of a sequence of moves, PMAC will bring the early part of the sequence to a stop
automatically, and then start up the following section with the new segment time. If the segment times
are small, this can be a very rough operation.
Added Pieces
At the beginning and end of a series of splined moves, PMAC automatically adds a zero-distance segment
of TA time for each axis, and performs the spline between this segment and the adjacent one. This results
in an S-curve acceleration to and from a stop.
Quantifying the Position Adjustment
The difference between the splined commanded position and the pre-splined (program-line) commanded
position for an axis at the end of segment n can be calculated according to the simple equation:
6
Dist(n)1)Dist(n
Diff
+
=
where Dist(n) is the programmed distance for segment n of the spline (whether in absolute or incremental
mode), and Dist(n+1) is the programmed distance for segment n+1.
5-Point Spline Correction
In contouring applications, it is often desired to pass through the series of points as closely as possible. In
these applications, the error introduced by the standard spline algorithm may be too large to tolerate.
However, a very simple pre-compensation can dramatically reduce the splining errors. For each point
X(n) in the spline, replace with a point X'(n) with the following formula before sending to PMAC:
Xn
X
n
X
n
X
n
'( )
() ()()
=
+
+
18 1
6
Non-Uniform Spline
The PMAC SPLINE2 mode is very similar to the SPLINE1 mode, except that the requirement that the
TA spline segment time remain constant is removed. The removal of this constraint makes the SPLINE2
mode a non-uniform non-rational cubic B-spline, whereas the SPLINE1 mode is a uniform non-rational
cubic B-spline. The non-rational specification indicates that there are no independent weightings (ratios)
of the different points in the spline.
The extra freedom of non-uniform segment times makes the SPLINE2 mode more flexible than the
SPLINE1 mode, but at the cost of about 20% extra calculation time. SPLINE2 mode is still more
efficient than any of the non-spline calculation modes. If the TA segment time is held constant,
SPLINE2 mode produces trajectories that are identical to SPLINE1 mode.
The added segment at the beginning of a spline has the same time as the first programmed segment; the
added segment at the end of a spline has the same time as the last programmed segment.
The combined time of any three consecutive segments in a SPLINE2 continuous spline must be less than
8,388,608 msec, or about 2 hours and 20 minutes.