◆ PositionSet()

virtual void PositionSet ( double  position)
pure virtual

Set the Command and Actual positions.

ℹ This function is avaliable in RapidCode and RapidSequencer

Description:
PositionSet will set the value of axis' command and actual position. It also sets the origin position = (actualPos + originPos - x). This is the same method used for the "Zero Position" button in RapidSetup.
Parameters
positionUnits.
Sample Code:
// set the command and actual position to zero
axis.PositionSet(0);
RapidSetup:
Go to axis screen. In the image below, the "Zero Position" button is the same as calling PositionSet(0).
Axis_PositionStatus.jpg
Note
This is the most useful and safe "PositionSet" method. This will void any Axis homing and set the HomeState to FALSE. You cannot set the position when the state is MOVING, STOPPING or STOPPED.
Examples
MotionHoldReleasedBySoftwareAddress.cpp, PVTmotionMultiAxis.cpp, SingleAxisSyncOutputs.cpp, SyncOutputWithMotion.cpp, and UpdateBufferPoints.cpp.