Motion.Velocity
This method of a motion object starts the axes moving at a continuous velocity as using an "S" shaped velocity profile similar to that shown below. This move type is the same as the acceleration phase of the SCurve move, allowing the acceleration to have smoother transitions. This comes at the expense of requiring a larger peak accelerations and decelerations.
The axes will continue to move at the specified velocity until a new velocity is commanded (by calling this method again with the MoveAttrModify attribute). The move is finished by using the Stop command.
See the section on synchronized motion for when either the SyncStart or SyncEnd attributes are specified.
Version History
Introduced in MPX 2.0.
Result
Void
Arguments
|
Argument |
Type |
Description |
Velocity |
Variant |
The target velocity in counts/sec2.
This argument will generally be an array of doubles where the number of elements in this array must match the number of mapped axes. If only one axis is mapped then a double can be used instead of an array. |
Accel |
Variant
(optional) |
The average acceleration, in counts/sec2, during the acceleration phase of the similar constant acceleration move.
The section on synchronized motion summarizes the different data types and default values this argument uses. |
JerkPercent |
Variant
(optional) |
The percentage of the acceleration phase that has an S curve. This argument varies between 0%, and 100%.
The section on synchronized motion summarizes the different data types and default values this argument uses. |
Attributes |
MoveAttr
(optional) |
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 |
speed |
Double |
|
accel |
Double |
|
jerkPct |
Double |
|
attributes |
Mpx.MoveAttribute |
|
|
Overload 2
|
Argument |
Type |
Description |
speed |
Double |
|
accel |
Double |
|
attributes |
Mpx.MoveAttribute |
|
|
Overload 3
|
Argument |
Type |
Description |
speed |
Double |
|
attributes |
Mpx.MoveAttribute |
|
|
Overload 4
|
Argument |
Type |
Description |
speed |
Double |
|
accel |
Double |
|
jerkPct |
Double |
|
|
Overload 5
|
Argument |
Type |
Description |
speed |
Double |
|
accel |
Double |
|
|
Overload 6
|
Argument |
Type |
Description |
speed |
Double |
|
|
Overload 7
|
Argument |
Type |
Description |
speed |
Array of Double |
|
accel |
Array of Double |
|
jerkPct |
Array of Double |
|
attributes |
Mpx.MoveAttribute |
|
|
Overload 8
|
Argument |
Type |
Description |
speed |
Array of Double |
|
accel |
Array of Double |
|
attributes |
Mpx.MoveAttribute |
|
|
Overload 9
|
Argument |
Type |
Description |
speed |
Array of Double |
|
attributes |
Mpx.MoveAttribute |
|
|
Overload 10
|
Argument |
Type |
Description |
speed |
Array of Double |
|
accel |
Array of Double |
|
jerkPct |
Array of Double |
|
|
Overload 11
|
Argument |
Type |
Description |
speed |
Array of Double |
|
accel |
Array of Double |
|
|
Overload 12
|
Argument |
Type |
Description |
speed |
Array of Double |
|
|
Visual Basic
Syntax
Sub Velocity(speed As Double, accel As Double, jerkPct As Double, attributes As Mpx.MoveAttribute)
Sub Velocity(speed As Double, accel As Double, attributes As Mpx.MoveAttribute)
Sub Velocity(speed As Double, attributes As Mpx.MoveAttribute)
Sub Velocity(speed As Double, accel As Double, jerkPct As Double)
Sub Velocity(speed As Double, accel As Double)
Sub Velocity(speed As Double)
Sub Velocity(speed As Double(), accel As Double(), jerkPct As Double(), attributes As Mpx.MoveAttribute)
Sub Velocity(speed As Double(), accel As Double(), attributes As Mpx.MoveAttribute)
Sub Velocity(speed As Double(), attributes As Mpx.MoveAttribute)
Sub Velocity(speed As Double(), accel As Double(), jerkPct As Double())
Sub Velocity(speed As Double(), accel As Double())
Sub Velocity(speed As Double())
Sample Code
|
' Overload 1
' speed accel jerk MoveAttr
controller.Motion(0).Velocity(5000.0, 500.0, 100.0, Mpx.MoveAttribute.Id)
' Overload 2
' speed accel MoveAttr
controller.Motion(0).Velocity(5000.0, 500.0, Mpx.MoveAttribute.Id)
' Overload 3
' speed MoveAttr
controller.Motion(0).Velocity(5000.0, Mpx.MoveAttribute.Id)
' Overload 4
' speed accel jerk
controller.Motion(0).Velocity(5000.0, 500.0, 100.0)
' Overload 5
' speed accel
controller.Motion(0).Velocity(5000.0, 500.0)
' Overload 6
' speed
controller.Motion(0).Velocity(5000.0)
' Overload 7
Dim speed() As Double = New Double() { 5000.0, 4000.0 }
Dim accel() As Double = New Double() { 500.0, 750.0 }
Dim jerkPct() As Double = New Double() { 100.0, 66.6 }
' speed accel jerk MoveAttr
controller.Motion(0).Velocity(speed, accel, jerkPct, Mpx.MoveAttribute.Id)
' Overload 8
Dim speed() As Double = New Double() { 5000.0, 4000.0 }
Dim accel() As Double = New Double() { 500.0, 750.0 }
' speed accel MoveAttr
controller.Motion(0).Velocity(speed, accel, Mpx.MoveAttribute.Id)
' Overload 9
Dim speed() As Double = New Double() { 5000.0, 4000.0 }
' speed MoveAttr
controller.Motion(0).Velocity(speed, Mpx.MoveAttribute.Id)
' Overload 10
Dim speed() As Double = New Double() { 5000.0, 4000.0 }
Dim accel() As Double = New Double() { 500.0, 750.0 }
Dim jerkPct() As Double = New Double() { 100.0, 66.6 }
' speed accel jerk
controller.Motion(0).Velocity(speed, accel, jerkPct)
' Overload 11
Dim speed() As Double = New Double() { 5000.0, 4000.0 }
Dim accel() As Double = New Double() { 500.0, 750.0 }
' speed accel
controller.Motion(0).Velocity(speed, accel)
' Overload 12
Dim speed() As Double = New Double() { 5000.0, 4000.0 }
' speed
controller.Motion(0).Velocity(speed) |
Sample Application
C#
Syntax
void Velocity(double speed, double accel, double jerkPct, Mpx.MoveAttribute attributes);
void Velocity(double speed, double accel, Mpx.MoveAttribute attributes);
void Velocity(double speed, Mpx.MoveAttribute attributes);
void Velocity(double speed, double accel, double jerkPct);
void Velocity(double speed, double accel);
void Velocity(double speed);
void Velocity(double[] speed, double[] accel, double[] jerkPct, Mpx.MoveAttribute attributes);
void Velocity(double[] speed, double[] accel, Mpx.MoveAttribute attributes);
void Velocity(double[] speed, Mpx.MoveAttribute attributes);
void Velocity(double[] speed, double[] accel, double[] jerkPct);
void Velocity(double[] speed, double[] accel);
void Velocity(double[] speed);
Sample Code
|
// Overload 1
// speed accel jerk MoveAttr
controller.Motion[0].Velocity(5000.0, 500.0, 100.0, Mpx.MoveAttribute.Id);
// Overload 2
// speed accel MoveAttr
controller.Motion[0].Velocity(5000.0, 500.0, Mpx.MoveAttribute.Id);
// Overload 3
// speed MoveAttr
controller.Motion[0].Velocity(5000.0, Mpx.MoveAttribute.Id);
// Overload 4
// speed accel jerk
controller.Motion[0].Velocity(5000.0, 500.0, 100.0);
// Overload 5
// speed accel
controller.Motion[0].Velocity(5000.0, 500.0);
// Overload 6
// speed
controller.Motion[0].Velocity(5000.0);
// Overload 7
double[] speed = new double[] { 5000.0, 4000.0 };
double[] accel = new double[] { 500.0, 750.0 };
double[] jerkPct = new double[] { 100.0, 66.6 };
// speed accel jerk MoveAttr
controller.Motion[0].Velocity(speed, accel, jerkPct, Mpx.MoveAttribute.Id);
// Overload 8
double[] speed = new double[] { 5000.0, 4000.0 };
double[] accel = new double[] { 500.0, 750.0 };
// speed accel MoveAttr
controller.Motion[0].Velocity(speed, accel, Mpx.MoveAttribute.Id);
// Overload 9
double[] speed = new double[] { 5000.0, 4000.0 };
// speed MoveAttr
controller.Motion[0].Velocity(speed, Mpx.MoveAttribute.Id);
// Overload 10
double[] speed = new double[] { 5000.0, 4000.0 };
double[] accel = new double[] { 500.0, 750.0 };
double[] jerkPct = new double[] { 100.0, 66.6 };
// speed accel jerk
controller.Motion[0].Velocity(speed, accel, jerkPct);
// Overload 11
double[] speed = new double[] { 5000.0, 4000.0 };
double[] accel = new double[] { 500.0, 750.0 };
// speed accel
controller.Motion[0].Velocity(speed, accel);
// Overload 12
double[] speed = new double[] { 5000.0, 4000.0 };
// speed
controller.Motion[0].Velocity(speed); |
See Also
MoveAttr
Axis Object
PositionScale
Synchronized Attributes
|