MotionController Axis MultiAxis IO IOPoint NetworkNode RsiError
Sample Apps Changelog

RapidCode API

◆ CommandPositionDirectSet()

void CommandPositionDirectSet ( double  pos)
pure virtual

directly sets the value of the command position of an axis

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
posThe value to set (units).
Sample Code:
// directly set the command position to 100000 - WARNING this could cause the motor to jump!
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