The PT algorithm is good for very closely spaced points or low accelerations. It is a very simple algorithm, requiring very few calculations; therefore, it is fast. It works well with low performance motion systems. If the points are spaced too far apart, the motion will be rough like shown in the example below. The acceleration between each point is instantaneous. It is best to keep the point spacing within a few samples.
Trapezoidal move example:
p1 = 050; t1 = 1.0;
p1 = 400; t1 = 3.5;
p1 = 450; t1 = 1.0;
Note: The Position array is direction sensitive meaning you must put a (-) sign on negative numbers.