GetAxesStatus
Gets the states of the selected axes.
Syntax
KsError GetAxesStatus(
int Length,
int* Indexes,
AxisStatus* States
);
Parameters
Length [in]: the number of axes.
Indexes [in]: the array of axes' indexes. Indexes are zero based. Aliases affect this parameter.
States [out]: pointer to the AxisStatus array type that will receive the axes' state.
Return value
If the function succeeds, it returns errNoError
, otherwise an error code. For more information about the error code, see the KsError list.
Remarks
When modulo axis is enabled, the commend, set, and actual positions in McSource will be applied with the modulo value.
Example
Copy
AxisStatus axesStatus[4] = { {0} };
int axesIdx[4] = { 0, 2, 4, 6 };
KsError nRet = GetAxesStatus(4, axesIdx, axesStatus);
for (int i = 0; i < 4; i++)
{
RtPrintf("Axis %d State: %d MotionError: 0X%x\n", i, axesStatus[i].State, axesStatus[i].MotionError);
}
Requirements
RT | Win32 | |
---|---|---|
Minimum supported version | 4.2 | 4.2 |
Header | ksmotion.h | ksmotion.h |
Library | KsApi_Rtss.lib | KsApi.lib |
See also