.

Motion.Spline

Executes a spline type motion. A user must specify the position and time values for a given motion at multiple points.

Version History

Introduced in MPX 2.0.

Arguments

 
Argument Type Units Description
Position Variant Encoder counts

Array of absolute position values.

DeltaTime Variant Seconds Array of delta-time values between Spline points.
EmptyCount Long
(optional)
Number of Spline points

This value specifies the minimum number of points in the controller's buffer to trigger an E_STOP action and a MOTION_OUT_OF_FRAMES event.

If ALL the points for a move fit into the controller's buffer, the emptyCount can be disabled with a value of 0.

If ALL the points for a move do NOT fit into the controller's buffer, you must set the emptyCount to a non-zero value. Any points that do not fit into the controller's buffer will be streamed from the host to the controller via the eventMgr. The controller monitors the emptyCount to determine if it will run out of points. If the number of frames left in the controller's buffer is less than the emptyCount, an E_STOP action will occur for all axes mapped to the Motion Supervisor. An E_STOP will decelerate the axes to a stop along the path of the controller's remaining points. The emptyCount must be set to a large enough value to allow the E_STOP to stop motion BEFORE the end of the point list is reached. For example, if each point takes 5 milliseconds to execute and an E_STOP is configured for 20 milliseconds, then emptyCount should be 4 (or higher).

The valid range is 0 to the controller's axis frame buffer size.

Attributes MoveAttr
(optional)
N/A

Flags that modify the motion.

If this argument is omitted then no attributes are assumed and the standard action is generated.

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
 

 

Visual Basic

Syntax

Sub Spline(position As Double(), deltaTime As Double())

Sub Spline(position As Double(), deltaTime As Double(), emptyCount As Int32)

Sub Spline(position As Double(), deltaTime As Double(), attributes As Mpx.MoveAttribute)

Sub Spline(position As Double(), deltaTime As Double(), emptyCount As Int32, attributes As Mpx.MoveAttribute)

Sub Spline(position As Double(,), deltaTime As Double())

Sub Spline(position As Double(,), deltaTime As Double(), emptyCount As Int32)

Sub Spline(position As Double(,), deltaTime As Double(), attributes As Mpx.MoveAttribute)

Sub Spline(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).Spline(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).Spline(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).Spline(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).Spline(pos, deltaTime, emptyCount, Mpx.MoveAttribute.Id)

' Overload 5
Dim pos(,) As Double = New Double(,) { { 1000.0, 2000.0 }, { 1500, 2500 } }
Dim deltaTime() As Double = New Double() { 1.0, 2.0 }
'                           pos  deltaTime
controller.Motion(0).Spline(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).Spline(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).Spline(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).Spline(pos, deltaTime, emptyCount, Mpx.MoveAttribute.Id)


Sample Application

 

C#

Syntax

void Spline(double[] position, double[] deltaTime);

void Spline(double[] position, double[] deltaTime, int emptyCount);

void Spline(double[] position, double[] deltaTime, Mpx.MoveAttribute attributes);

void Spline(double[] position, double[] deltaTime, int emptyCount, Mpx.MoveAttribute attributes);

void Spline(double[,] position, double[] deltaTime);

void Spline(double[,] position, double[] deltaTime, int emptyCount);

void Spline(double[,] position, double[] deltaTime, Mpx.MoveAttribute attributes);

void Spline(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].Spline(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].Spline(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].Spline(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].Spline(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].Spline(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].Spline(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].Spline(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].Spline(pos, deltaTime, emptyCount, Mpx.MoveAttribute.Id);

 

See Also

PVTF
PTF
PVT

Bessel
BSpline
BSpline2

MoveAttr

Axis Object
PositionScale

 

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2021 Motion Engineering