APIs, concepts, guides, and more
|
PT motion is the simplest streaming motion requiring only Positions and Time deltas arrays.
PT motion is the simplest streaming motion to use because it only requires an array of Positions and Time deltas. The controller is responsible for figuring out the velocity, and acceleration for each motion segment. MovePT currently supports several types of interpolation, as described in Streaming Motion.
Simple PT Interpolation | Output Example |
---|---|
RSIMotionTypePT is good for very closely spaced points (int time) or low accelerations. It is a very simple algorithm, requiring very few calculations; therefore, it is fast. 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[0] = 050; t1[0] = 1.0; p1[1] = 400; t1[1] = 3.5; p1[2] = 450; t1[2] = 1.0; Note: The Position array is direction sensitive meaning you must put a (-) sign on negative numbers. |
BSpline Interpolation | Output Example |
---|---|
RSIMotionTypeBSPLINE interpolation is our recommended technique to blend transitions between segments. Use BSpline for smooth paths or systems with poor acceleration response. Trapezoidal move example: p[0] = 050; t[0] = 1.0; p[1] = 400; t[1] = 3.5; p[2] = 450; t[2] = 1.0; Note: The Position array is direction sensitive meaning you must put a (-) sign on negative numbers. |
All motion streaming methods can be used for coordinated motion on MultiAxis objects. It is important that you setup your arrays appropriately for a MultiAxis object. See the examples below on how to structure your arrays for MultiAxis PT Motion.
The position data for all three axes are combined into the array. The time array is shared for all axes. This is why you need 3x as many position points than you need time points. See the example below:
1st Segment | 2nd Segment | 3rd Segment | Resulting Motion Plot | |
---|---|---|---|---|
AxisX | p[0] = 050; [0] = 1; | p[2] = 400; t[1] = 3.5; | p[4] = 450; t[2] = 1; | |
AxisY | p[1] = 025; t[0] = 1; | p[3] = 200; t[1] = 3.5; | p[5] = 225; t[2] = 1; | |
AxisZ | p[2] = 012.5; t[0] = 1; | p[5] = 100; t[1] = 3.5; | p[8] = 112.5; t[2] = 1; |
This code demonstrates that different actions that you can take after stopping a PT Streaming motion.