GetAxisError
Gets general axis errors not relating to the functions, such as axis errors, drive errors, and communication errors.
Syntax
KsError GetAxisError(
int Index,
WORD* ErrorId
);
Parameters
Index [in]: the index of an axis. Indexes are zero based. Aliases affect this parameter.
ErrorId [out]: error identification. The value is vendor-specific and should be checked in your servo drive manual.
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
- If ErrorId is 11, it could be KINGSTAR position error, or servo drive's error (see your servo drive's manual).
- If real axes are used, the code read from 0x603F will be displayed first.
| Error Code | Description |
|---|---|
| 0x01 | Communication error. Using GetAxisError while an axis is in non-Op state returns this error. |
| 0x02 | Position lag error. Same as errFollowingError in KsError. The maximum following error is reached. The motion is stopped and the axis is disabled. |
| 0x03 |
Command jump error. Same as |
| Other error code | If an alarm occurs on a servo drive, GetAxisError will read from the 0x603F object. |
Example
WORD axisErr = 0;
KsError nRet = GetAxisError(0, &axisErr);
RtPrintf("Axis error: 0X%x\n", axisErr);
Requirements
| RT | Win32 | |
|---|---|---|
| Minimum supported version | 4.0 | 4.0 |
| Header | ksmotion.h | ksmotion.h |
| Library | KsApi_Rtss.lib | KsApi.lib |
See also