Motion.PT
Executes a PT motion. PT stands for "Position - Time." A user must specify the position and time values for a given motion at multiple points.
The position for a PT move is continuous. However, the velocity is not continuous. The velocity maintains a constant value between PT points, but is discontinuous at the PT points. The acceleration and jerk values are zero at all times. Because of the discontinuity of velocity, PT motion should only be used when the time between points are small; otherwise spline (Bessel, Spline, BSpline, and BSpline2) or PVT motion should be used. For more information about PVT profiles, please see PT and PVT Path Motion.
Version History
Introduced in MPX 2.0.
Result
Void
Arguments
Overload 1
|
Argument |
Type |
Description |
position |
Array of Double |
|
deltaTime |
Array of Double |
|
|
Overload 2
|
Argument |
Type |
Description |
position |
Array of Double |
|
deltaTime |
Array of Double |
|
emptyCount |
Int32 |
|
|
Overload 3
|
Argument |
Type |
Description |
position |
Array of Double |
|
deltaTime |
Array of Double |
|
attributes |
Mpx.MoveAttribute |
|
|
Overload 4
|
Argument |
Type |
Description |
position |
Array of Double |
|
deltaTime |
Array of Double |
|
emptyCount |
Int32 |
|
attributes |
Mpx.MoveAttribute |
|
|
Overload 5
|
Argument |
Type |
Description |
position |
2-D Array of Double |
|
deltaTime |
Array of Double |
|
|
Overload 6
|
Argument |
Type |
Description |
position |
2-D Array of Double |
|
deltaTime |
Array of Double |
|
emptyCount |
Int32 |
|
|
Overload 7
|
Argument |
Type |
Description |
position |
2-D Array of Double |
|
deltaTime |
Array of Double |
|
attributes |
Mpx.MoveAttribute |
|
|
Overload 8
|
Argument |
Type |
Description |
position |
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 PT(position As Double(), deltaTime As Double())
Sub PT(position As Double(), deltaTime As Double(), emptyCount As Int32)
Sub PT(position As Double(), deltaTime As Double(), attributes As Mpx.MoveAttribute)
Sub PT(position As Double(), deltaTime As Double(), emptyCount As Int32, attributes As Mpx.MoveAttribute)
Sub PT(position As Double(,), deltaTime As Double())
Sub PT(position As Double(,), deltaTime As Double(), emptyCount As Int32)
Sub PT(position As Double(,), deltaTime As Double(), attributes As Mpx.MoveAttribute)
Sub PT(position 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 deltaTime() As Double = New Double() { 1.0, 2.0 }
' pos deltaTime
controller.Motion(0).PT(pos, deltaTime)
' Overload 2
Dim pos() As Double = New Double() { 1000.0, 2000.0 }
Dim deltaTime() As Double = New Double() { 1.0, 2.0 }
Dim emptyCount As Int32 = 0
' pos deltaTime emptyCount
controller.Motion(0).PT(pos, deltaTime, emptyCount)
' Overload 3
Dim pos() As Double = New Double() { 1000.0, 2000.0 }
Dim deltaTime() As Double = New Double() { 1.0, 2.0 }
' pos deltaTime MoveAttr
controller.Motion(0).PT(pos, deltaTime, Mpx.MoveAttribute.Id)
' Overload 4
Dim pos() As Double = New Double() { 1000.0, 2000.0 }
Dim deltaTime() As Double = New Double() { 1.0, 2.0 }
Dim emptyCount As Int32 = 0
' pos deltaTime emptyCount MoveAttr
controller.Motion(0).PT(pos, deltaTime, emptyCount, Mpx.MoveAttribute.Id)
' Overload 5
Dim pos(,) As Double = New Double(,) { { 1000.0, 2000.0 }, { 1500.0, 2500.0 } }
Dim deltaTime() As Double = New Double() { 1.0, 2.0 }
' pos deltaTime
controller.Motion(0).PT(pos, deltaTime)
' Overload 6
Dim pos(,) As Double = New Double(,) { { 1000.0, 2000.0 }, { 1500, 2500 } }
Dim deltaTime() As Double = New Double() { 1.0, 2.0 }
Dim emptyCount As Int32 = 0
' pos deltaTime emptyCount
controller.Motion(0).PT(pos, deltaTime, emptyCount)
' Overload 7
Dim pos(,) As Double = New Double(,) { { 1000.0, 2000.0 }, { 1500, 2500 } }
Dim deltaTime() As Double = New Double() { 1.0, 2.0 }
' pos deltaTime MoveAttr
controller.Motion(0).PT(pos, deltaTime, Mpx.MoveAttribute.Id)
' Overload 8
Dim pos(,) As Double = New Double(,) { { 1000.0, 2000.0 }, { 1500, 2500 } }
Dim deltaTime() As Double = New Double() { 1.0, 2.0 }
Dim emptyCount As Int32 = 0
' pos deltaTime emptyCount MoveAttr
controller.Motion(0).PT(pos, deltaTime, emptyCount, Mpx.MoveAttribute.Id) |
Sample Application
C#
Syntax
void PT(double[] position, double[] deltaTime);
void PT(double[] position, double[] deltaTime, int emptyCount);
void PT(double[] position, double[] deltaTime, Mpx.MoveAttribute attributes);
void PT(double[] position, double[] deltaTime, int emptyCount, Mpx.MoveAttribute attributes);
void PT(double[,] position, double[] deltaTime);
void PT(double[,] position, double[] deltaTime, int emptyCount);
void PT(double[,] position, double[] deltaTime, Mpx.MoveAttribute attributes);
void PT(double[,] position, double[] deltaTime, int emptyCount, Mpx.MoveAttribute attributes);
Sample Code
|
// Overload 1
double[] pos = new double[] { 1000.0, 2000.0 };
double[] deltaTime = new double[] { 1.0, 2.0 };
// pos deltaTime
controller.Motion[0].PT(pos, deltaTime);
// Overload 2
double[] pos = new double[] { 1000.0, 2000.0 };
double[] deltaTime = new double[] { 1.0, 2.0 };
int emptyCount = 0;
// pos deltaTime emptyCount
controller.Motion[0].PT(pos, deltaTime, emptyCount);
// Overload 3
double[] pos = new double[] { 1000.0, 2000.0 };
double[] deltaTime = new double[] { 1.0, 2.0 };
// pos deltaTime MoveAttr
controller.Motion[0].PT(pos, deltaTime, Mpx.MoveAttribute.Id);
// Overload 4
double[] pos = new double[] { 1000.0, 2000.0 };
double[] deltaTime = new double[] { 1.0, 2.0 };
int emptyCount = 0;
// pos deltaTime emptyCount MoveAttr
controller.Motion[0].PT(pos, deltaTime, emptyCount, Mpx.MoveAttribute.Id);
// Overload 5
double[,] pos = new double[,] { { 1000.0, 2000.0 }, { 1500, 2500 } };
double[] deltaTime = new double[] { 1.0, 2.0 };
// pos deltaTime
controller.Motion[0].PT(pos, deltaTime);
// Overload 6
double[,] pos = new double[,] { { 1000.0, 2000.0 }, { 1500, 2500 } };
double[] deltaTime = new double[] { 1.0, 2.0 };
int emptyCount = 0;
// pos deltaTime emptyCount
controller.Motion[0].PT(pos, deltaTime, emptyCount);
// Overload 7
double[,] pos = new double[,] { { 1000.0, 2000.0 }, { 1500, 2500 } };
double[] deltaTime = new double[] { 1.0, 2.0 };
// pos deltaTime MoveAttr
controller.Motion[0].PT(pos, deltaTime, Mpx.MoveAttribute.Id);
// Overload 8
double[,] pos = new double[,] { { 1000.0, 2000.0 }, { 1500, 2500 } };
double[] deltaTime = new double[] { 1.0, 2.0 };
int emptyCount = 0;
// pos deltaTime emptyCount MoveAttr
controller.Motion[0].PT(pos, deltaTime, emptyCount, Mpx.MoveAttribute.Id); |
See Also
PVTF
PTF
PVT
Bessel
Spline
BSpline
BSpline2
MoveAttr
Axis Object
PositionScale
|