The RMP Motion Controller APIs

◆ CommandPositionDirectSet()

void CommandPositionDirectSet ( double position)
Description:
The motor will servo directly to the new command position the next servo sample after the new command position is set. This change in position will not be gradual or controlled, as it is in MoveTrapezoidal (for example). Use one of the motion methods (e.g. MoveTrapezoidal) for controlled, gradual motion.
Parameters
positionThe value to set (UserUnits).
Remarks
This function is also available in RapidSequencer.
Sample Code:
// directly set the command position to 100000 - WARNING this could cause the motor to jump!
axis.CommandPositionDirectSet(100000);
Note
Setting the command position will cause an axis to jump or could cause a position error. The command position is typically controlled by the trajectory calculator, setting this value is not recommended. Cannot set if State is MOVING, STOPPING or STOPPED.
See also
CommandPositionSet