SetAxisPositionOffset
Shifts the coordinate system of an axis by manipulating both the setpoint position as well as the actual position of an axis with the same value without causing any movement (recalibration with same following error). This can be used for instance for a reference situation.
Syntax
KsCommandStatus SetAxisPositionOffset(
int Index,
double Position,
BOOL Relative,
McExecutionMode ExecutionMode
);
Parameters
Index [in]: the index of an axis. Indexes are zero based. Aliases affect this parameter.
Position [in]: a position unit (it's the distance unit if Relative is TRUE).
Relative [in]: TRUE if it's relative distance; FALSE if it's absolute position. By default, it is FALSE.
ExecutionMode [in]: defines the chronological sequence of the function. See the McExecutionMode type.
Return value
Returns the KsCommandStatus structure.
Remarks
- This function can only be used in the Standstill or Disabled state.
- Relative means that Position (distance unit) is added to the actual position of the axis at the time of execution. The resulting target position will be the actual position + distance. For example, the actual position is 50. Distance is 100. The target position will be 150. "Absolute" means that the actual position of the axis is the value specified in the Position parameter.
Example
N/A
Requirements
RT | Win32 | |
---|---|---|
Minimum supported version | 4.0 | 4.0 |
Header | ksmotion.h | ksmotion.h |
Library | KsApi_Rtss.lib | KsApi.lib |