MotionController Axis MultiAxis IO IOPoint NetworkNode RsiError
Sample Apps Changelog

RapidCode API

◆ PositionSet()

void PositionSet ( double  position)
pure virtual

Set the Command and Actual positions.

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
AbsoluteMotion.cpp, AbsoluteMotion.cs, Camming.cpp, Camming.cs, FeedRate.cpp, FeedRate.cs, FinalVelocity.cpp, FinalVelocity.cs, Gearing.cpp, Gearing.cs, MotionHoldReleasedByDigitalInput.cpp, MotionHoldReleasedByDigitalInput.cs, MotionHoldReleasedByPosition.cpp, MotionHoldReleasedByPosition.cs, MotionHoldReleasedBySoftwareAddress.cpp, MotionHoldReleasedBySoftwareAddress.cs, PointToPointMultiaxisMotion.cpp, PointToPointMultiaxisMotion.cs, PTmotion.cpp, PTmotion.cs, PTmotionWhileStopping.cpp, PTmotionWhileStopping.cs, PVAJTmotion.cs, PVTmotion.cpp, PVTmotion.cs, PVTmotionMultiAxis.cpp, RelativeMotion.cs, SCurveMotion.cpp, SCurveMotion.cs, SetUserUnits.cpp, SetUserUnits.cs, SingleAxisSyncOutputs.cpp, SingleAxisSyncOutputs.cs, SyncOutputWithMotion.cpp, UpdateBufferPoints.cpp, UserLimitDigitalInputEStopStorePosition.cs, UserLimitGainChangeBasedOnPosition.cpp, UserLimitPositionOneCondition.cpp, UserLimitPositionOneCondition.cs, VelocitySetByAnalogInputValue.cpp, and VelocitySetByAnalogInputValue.cs.