The RMP Motion Controller APIs

◆ CommandPositionSet()

void CommandPositionSet ( double position)
Description:
CommandPositionSet writes to the controller's axis' origin to adjust the command position so that it equals the positionparameter. The axis' actual position will also be changed by the same amount. Because the origin is an offset from the controller's command and actual positions, the CommandPositionSet will not cause a change to the position error. Thus, if the motor is enabled, it will not jump when CommandPositionSet is called.

CommandPositionSet should not be called when the axis is in a STOPPING, STOPPED, or MOVING state. If called while in these states, CommandPositionSet will not set the command position and return a RSICONSTANTAxisMessageCOMMAND_NOT_SET error which is necessary to protect the application from conflicting with the controller's trajectory generation.

Parameters
positionThe value to set (UserUnits).
Remarks
This function is also available in RapidSequencer.
Sample Code:
// set the command position to 100000
axis.CommandPositionSet(100000);
RapidSetup:
Go to axis screen. In the image below, CommandPositionSet sets the value in the Command Position text box. In the image, the command position is: 4525826
Note
Topics:
PositionMethods
See also
PositionSet