Motion.PTF
Executes a PTF motion. PTF stands for "Position, Time, Feedforward." A user must specify the position, time, and feedforward values for a given motion at multiple points. PTF motion is identical to PT motion with the exception of the additional feedforward terms.
As with PT motion, the position for a PTF move is continuous. However, the velocity is not continuous. The velocity maintains a constant value between PTF points, but is discontinuous at the PTF points. The acceleration and jerk values are zero at all times. Because of the discontinuity of velocity, PTF motion should only be used when the time between points are small; otherwise PVTF motion should be used. For more information about PVT profiles, please see PT and PVT Path Motion.
The feedforward values are interpolated linearly over the PT time intervals. The feedfoward values correspond to the position values. (i.e. When the motion reaches a specified position, the interpolated feedforward value will be equal to what is specified in the motion parameters.)
The feedforward values are not set to zero at the beginning of the move; they retain the last value that is specified in the PTF or PVTF motion parameters.
The feedforward values are not zeroed by non-PTF or PVTF moves (i.e. PT, PVT, Spline, S-Curve, etc.).
Version History
Introduced in MPX 2.0.
Result
Void
Arguments
Overload 1
|
Argument |
Type |
Description |
position |
Array of Double |
|
feedForward |
Array of Double |
|
deltaTime |
Array of Double |
|
|
Overload 2
|
Argument |
Type |
Description |
position |
Array of Double |
|
feedForward |
Array of Double |
|
deltaTime |
Array of Double |
|
emptyCount |
Int32 |
|
|
Overload 3
|
Argument |
Type |
Description |
position |
Array of Double |
|
feedForward |
Array of Double |
|
deltaTime |
Array of Double |
|
attributes |
Mpx.MoveAttribute |
|
|
Overload 4
|
Argument |
Type |
Description |
position |
Array of Double |
|
feedForward |
Array of Double |
|
deltaTime |
Array of Double |
|
emptyCount |
Int32 |
|
attributes |
Mpx.MoveAttribute |
|
|
Overload 5
|
Argument |
Type |
Description |
position |
2-D Array of Double |
|
feedForward |
2-D Array of Double |
|
deltaTime |
Array of Double |
|
|
Overload 6
|
Argument |
Type |
Description |
position |
2-D Array of Double |
|
feedForward |
2-D Array of Double |
|
deltaTime |
Array of Double |
|
emptyCount |
Int32 |
|
|
Overload 7
|
Argument |
Type |
Description |
position |
2-D Array of Double |
|
feedForward |
2-D Array of Double |
|
deltaTime |
Array of Double |
|
attributes |
Mpx.MoveAttribute |
|
|
Overload 8
|
Argument |
Type |
Description |
position |
2-D Array of Double |
|
feedForward |
2-D Array of Double |
|
deltaTime |
Array of Double |
|
emptyCount |
Int32 |
|
attributes |
Mpx.MoveAttribute |
|
|
Common Exceptions
|
Error |
Occurs when... |
Argument |
An invalid argument is specified. |
|
Visual Basic
Syntax
Sub PTF(position As Double(), feedForward As Double(), deltaTime As Double())
Sub PTF(position As Double(), feedForward As Double(), deltaTime As Double(), emptyCount As Int32)
Sub PTF(position As Double(), feedForward As Double(), deltaTime As Double(), attributes As Mpx.MoveAttribute)
Sub PTF(position As Double(), feedForward As Double(), deltaTime As Double(), emptyCount As Int32, attributes As Mpx.MoveAttribute)
Sub PTF(position As Double(,), feedForward As Double(,), deltaTime As Double())
Sub PTF(position As Double(,), feedForward As Double(,), deltaTime As Double(), emptyCount As Int32)
Sub PTF(position As Double(,), feedForward As Double(,), deltaTime As Double(), attributes As Mpx.MoveAttribute)
Sub PTF(position As Double(,), feedForward As Double(,), deltaTime As Double(), emptyCount As Int32, attributes As Mpx.MoveAttribute)
Sample Code
|
' Overload 1
Dim pos() As Double = New Double() { 1000.0, 2000.0 }
Dim feedForward() As Double = New Double() { 0.1, 0.3 }
Dim deltaTime() As Double = New Double() { 1.0, 2.0 }
' pos feedForward deltaTime
controller.Motion(0).PTF(pos, feedForward, deltaTime)
' Overload 2
Dim pos() As Double = New Double() { 1000.0, 2000.0 }
Dim feedForward() As Double = New Double() { 0.1, 0.3 }
Dim deltaTime() As Double = New Double() { 1.0, 2.0 }
Dim emptyCount As Int32 = 0
' pos feedForward deltaTime emptyCount
controller.Motion(0).PTF(pos, feedForward, deltaTime, emptyCount)
' Overload 3
Dim pos() As Double = New Double() { 1000.0, 2000.0 }
Dim feedForward() As Double = New Double() { 0.1, 0.3 }
Dim deltaTime() As Double = New Double() { 1.0, 2.0 }
' pos feedForward deltaTime MoveAttr
controller.Motion(0).PTF(pos, feedForward, deltaTime, Mpx.MoveAttribute.Id)
' Overload 4
Dim pos() As Double = New Double() { 1000.0, 2000.0 }
Dim feedForward() As Double = New Double() { 0.1, 0.3 }
Dim deltaTime() As Double = New Double() { 1.0, 2.0 }
Dim emptyCount As Int32 = 0
' pos feedForward deltaTime emptyCount MoveAttr
controller.Motion(0).PTF(pos, feedForward, deltaTime, emptyCount, Mpx.MoveAttribute.Id)
' Overload 5
Dim pos(,) As Double = New Double(,) { { 1000.0, 2000.0 }, { 1500.0, 2500.0 } }
Dim feedForward(,) As Double = New Double(,) { { 0.1, 0.3 }, { 0.2, 0.4 } }
Dim deltaTime() As Double = New Double() { 1.0, 2.0 }
' pos feedForward deltaTime
controller.Motion(0).PTF(pos, feedForward, deltaTime)
' Overload 6
Dim pos(,) As Double = New Double(,) { { 1000.0, 2000.0 }, { 1500, 2500 } }
Dim feedForward(,) As Double = New Double(,) { { 0.1, 0.3 }, { 0.2, 0.4 } }
Dim deltaTime() As Double = New Double() { 1.0, 2.0 }
Dim emptyCount As Int32 = 0
' pos feedForward deltaTime emptyCount
controller.Motion(0).PTF(pos, feedForward, deltaTime, emptyCount)
' Overload 7
Dim pos(,) As Double = New Double(,) { { 1000.0, 2000.0 }, { 1500, 2500 } }
Dim feedForward(,) As Double = New Double(,) { { 0.1, 0.3 }, { 0.2, 0.4 } }
Dim deltaTime() As Double = New Double() { 1.0, 2.0 }
' pos feedForward deltaTime MoveAttr
controller.Motion(0).PTF(pos, feedForward, deltaTime, Mpx.MoveAttribute.Id)
' Overload 8
Dim pos(,) As Double = New Double(,) { { 1000.0, 2000.0 }, { 1500, 2500 } }
Dim feedForward(,) As Double = New Double(,) { { 0.1, 0.3 }, { 0.2, 0.4 } }
Dim deltaTime() As Double = New Double() { 1.0, 2.0 }
Dim emptyCount As Int32 = 0
' pos feedForward deltaTime emptyCount MoveAttr
controller.Motion(0).PTF(pos, feedForward, deltaTime, emptyCount, Mpx.MoveAttribute.Id) |
Sample Application
C#
Syntax
void PTF(double[] position, double[] feedForward, double[] deltaTime);
void PTF(double[] position, double[] feedForward, double[] deltaTime, int emptyCount);
void PTF(double[] position, double[] feedForward, double[] deltaTime, Mpx.MoveAttribute attributes);
void PTF(double[] position, double[] feedForward, double[] deltaTime, int emptyCount, Mpx.MoveAttribute attributes);
void PTF(double[,] position, double[,] feedForward, double[] deltaTime);
void PTF(double[,] position, double[,] feedForward, double[] deltaTime, int emptyCount);
void PTF(double[,] position, double[,] feedForward, double[] deltaTime, Mpx.MoveAttribute attributes);
void PTF(double[,] position, double[,] feedForward, double[] deltaTime, int emptyCount, Mpx.MoveAttribute attributes);
Sample Code
|
// Overload 1
double[] pos = new double[] { 1000.0, 2000.0 };
double[] feedForward = new double[] { 0.1, 0.3 };
double[] deltaTime = new double[] { 1.0, 2.0 };
// pos feedForward deltaTime
controller.Motion[0].PTF(pos, feedForward, deltaTime);
// Overload 2
double[] pos = new double[] { 1000.0, 2000.0 };
double[] feedForward = new double[] { 0.1, 0.3 };
double[] deltaTime = new double[] { 1.0, 2.0 };
int emptyCount = 0;
// pos feedForward deltaTime emptyCount
controller.Motion[0].PTF(pos, feedForward, deltaTime, emptyCount);
// Overload 3
double[] pos = new double[] { 1000.0, 2000.0 };
double[] feedForward = new double[] { 0.1, 0.3 };
double[] deltaTime = new double[] { 1.0, 2.0 };
// pos feedForward deltaTime MoveAttr
controller.Motion[0].PTF(pos, feedForward, deltaTime, Mpx.MoveAttribute.Id);
// Overload 4
double[] pos = new double[] { 1000.0, 2000.0 };
double[] feedForward = new double[] { 0.1, 0.3 };
double[] deltaTime = new double[] { 1.0, 2.0 };
int emptyCount = 0;
// pos feedForward deltaTime emptyCount MoveAttr
controller.Motion[0].PTF(pos, feedForward, deltaTime, emptyCount, Mpx.MoveAttribute.Id);
// Overload 5
double[,] pos = new double[,] { { 1000.0, 2000.0 }, { 1500, 2500 } };
double[,] feedForward = new double[,] { { 0.1, 0.3 }, { 0.2, 0.4 } };
double[] deltaTime = new double[] { 1.0, 2.0 };
// pos feedForward deltaTime
controller.Motion[0].PTF(pos, feedForward, deltaTime);
// Overload 6
double[,] pos = new double[,] { { 1000.0, 2000.0 }, { 1500, 2500 } };
double[,] feedForward = new double[,] { { 0.1, 0.3 }, { 0.2, 0.4 } };
double[] deltaTime = new double[] { 1.0, 2.0 };
int emptyCount = 0;
// pos feedForward deltaTime emptyCount
controller.Motion[0].PTF(pos, feedForward, deltaTime, emptyCount);
// Overload 7
double[,] pos = new double[,] { { 1000.0, 2000.0 }, { 1500, 2500 } };
double[,] feedForward = new double[,] { { 0.1, 0.3 }, { 0.2, 0.4 } };
double[] deltaTime = new double[] { 1.0, 2.0 };
// pos feedForward deltaTime MoveAttr
controller.Motion[0].PTF(pos, feedForward, deltaTime, Mpx.MoveAttribute.Id);
// Overload 8
double[,] pos = new double[,] { { 1000.0, 2000.0 }, { 1500, 2500 } };
double[,] feedForward = new double[,] { { 0.1, 0.3 }, { 0.2, 0.4 } };
double[] deltaTime = new double[] { 1.0, 2.0 };
int emptyCount = 0;
// pos feedForward deltaTime emptyCount MoveAttr
controller.Motion[0].PTF(pos, feedForward, deltaTime, emptyCount, Mpx.MoveAttribute.Id); |
See Also
PVTF
PVT
PT
Bessel
Spline
BSpline
BSpline2
MoveAttr
Axis Object
PositionScale
|