MoveAxisAdditive
Adds a relative distance based on the last commanded position in the Discrete Motion state. The definition of a commanded position can be found in McSource.
Syntax
KsCommandStatus MoveAxisAdditive(
int Index,
double Distance,
double Velocity,
double Acceleration,
double Deceleration,
double Jerk,
McBufferMode BufferMode
);
Parameters
Index [in]: the index of an axis. Indexes are zero based. Aliases affect this parameter.
Distance [in]: the relative distance for the motion. [second]
Velocity [in]: a value of the maximum velocity. (not necessarily reached) [unit/second]
Acceleration [in]: a value of the acceleration. The unit is determined by the McProfileType type. (increasing energy of the motor) [unit/second2] or [second]
Deceleration [in]: a value of the deceleration. The unit is determined by the McProfileType type. (decreasing energy of the motor) [unit/second2] or [second]
Jerk [in]: a value of the jerk. The unit is determined by the McProfileType type. [unit/second3] or [second]
BufferMode [in]: defines how to blend the velocity of two functions. See the McBufferMode type.
Return value
Returns the KsCommandStatus structure.
Remarks
- After this command is completed, the total distance the axis traveled is the distance given by the previous move command plus the distance added by MoveAxisAdditive.
- If the previous command is a moving command and is being aborted, when MoveAxisAdditive is run, the distance the axis will travel is the remaining distance left by the previous command plus the distance added by MoveAxisAdditive.
- If the previous command is a velocity command, it will be aborted and MoveAxisAdditive is run.
- For more information about how the blending modes work, see Concepts > Blend movements.
Example
N/A
Requirements
RT | Win32 | |
---|---|---|
Minimum supported version | 4.0 | 4.0 |
Header | ksmotion.h | ksmotion.h |
Library | KsApi_Rtss.lib | KsApi.lib |
See also