.

Velocity Motion

Velocity motion accelerates the axis/axes to a specified velocity. The axes will continue to move at the specified velocity until a new velocity is commanded (by calling the method again with MoveAttrModify attribute). The move is finished by using the Motion.Stop command or by commanding a new velocity motion to zero velocity.

Velocity This type of move has an "S" shape to the acceleration phase. This method uses the JerkPercent argument to decide how much of the acceleration phase is curved. A JerkPercent of zero produces a trapezoidal velocity profile.

The following table summarizes the arguments that each of the methods take. The Velocity argument is always required but all the other arguments are optional.

 
Velocity
Accel
JerkPercent
Attributes
Velocity
*
x
x
x

If an optional argument is omitted, the value used is taken from the corresponding properties starting with Default in either the Axis or the Motion objects.

The Attributes argument modifies the default behavior of each of these motions enabling a wide range of variations of the basic motion to be generated. The Attributes argument does not have a corresponding default property and must be specified for each motion.

For example

Before a motion object can be used for any motion it must first be mapped to an axis (or axes). This can be done with the following Visual Basic instruction to allow Motion object 0 to use axis 0.

Visual Basic

Controller.Motion(0).AxesClear() 
Controller.Motion(0).AxisAdd(0)

C#

Controller.Motion[0].AxesClear(); 
Controller.Motion[0].AxisAdd(0);

 

Initially, the acceleration is set zero and needs to be given values before any motion will start. DefaultJerkPercent is set to 66 2/3 at controller initialization, and doesn't necessarily need to be set before commanding a velocity move. The following code sets up the default motion parameters for a velocity move. These instructions only need to be issued once, commonly when the application starts, and are used by all the subsequent motion commands.

Visual Basic

Controller1.Motion(0).DefaultAccel = 100000   
Controller1.Motion(0).DefaultJerkPercent = 50

C#

Controller.Motion[0].DefaultAccel =   100000;
Controller.Motion[0].DefaultJerkPercent = 50; 

 

The following Visual Basic code will start a velocity move on the axis mapped to motion object 0.

Visual Basic

Controller.Motion(0).Velcity(1000) 

C#

Controller.Motion[0].Velcity(1000);

 

The speed can be changed at any time by issuing the command again using the modify attribute. The acceleration and Jerk Percent used for this change in speed are the defaults set up previously.

Visual Basic

Controller.Motion(0).Velcity(2000, Mpx.MoveAttribute.Modify) 

C#

Controller.Motion[0].Velcity(2000, Mpx.MoveAttribute.Modify); 

 

The following stop command will bring the axis to a standstill before terminating the velocity motion. The stop command could be used by itself but the Motion.StopTime property would determine the deceleration.

Visual Basic

Controller.Motion(0).Velcity(0, Mpx.MoveAttribute.Modify) 

C#

Controller.Motion[0].Velcity(0, Mpx.MoveAttribute.Modify);

 

See Also

Motion.Velocity
Motion.Stop
Motion.StopTime

MoveAttr

 

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