GetAxisMotionState
Gets the state of the axis in connection with the motion currently in progress.
Syntax
KsError GetAxisMotionState(
int Index,
McMotionState* State,
McDirection* Direction
);
Parameters
Index [in]: the index of an axis. Indexes are zero based. Aliases affect this parameter.
State [out]: gets the motion state of the axis. See the McMotionState type.
Direction [out]: gets the direction of the axis. See the McDirection type.
Return value
If the function succeeds, it returns errNoError, otherwise an error code. For more information about the error code, see the KsError list.
Example
Copy
McMotionState motionState = McMotionState::mcConstantVelocity;
McDirection mcDirection = McDirection::mcPositiveDirection;
KsError nRet = GetAxisMotionState(0, &motionState, &mcDirection);
Requirements
| RT | Win32 | |
|---|---|---|
| Minimum supported version | 4.0 | 4.0 |
| Header | ksmotion.h | ksmotion.h |
| Library | KsApi_Rtss.lib | KsApi.lib |
See also