Axis State Control Functions.
More...
|
RTN_ERR FNTYPE | NMC_AxisEnable (I32_T DevID, I32_T AxisIndex) |
| Enable an axis. More...
|
|
RTN_ERR FNTYPE | NMC_AxisDisable (I32_T DevID, I32_T AxisIndex) |
| Disable an axis. More...
|
|
RTN_ERR FNTYPE | NMC_AxisGetStatus (I32_T DevID, I32_T AxisIndex, I32_T *PRetAxisStatus) |
| Get the status of the axis. More...
|
|
RTN_ERR FNTYPE | NMC_AxisGetState (I32_T DevID, I32_T AxisIndex, I32_T *PRetAxisState) |
| Get the state of the axis. More...
|
|
RTN_ERR FNTYPE | NMC_AxisResetState (I32_T DevID, I32_T AxisIndex) |
| Reset the state of the axis. More...
|
|
RTN_ERR FNTYPE | NMC_AxisResetDriveAlm (I32_T DevID, I32_T AxisIndex) |
| Reset the axis servo alarm. More...
|
|
RTN_ERR FNTYPE | NMC_AxisGetDriveAlmCode (I32_T DevID, I32_T AxisIndex, I32_T *PRetAlmCode) |
| Get the axis servo alarm code. More...
|
|
Axis State Control Functions.
Disable an axis.
- Parameters
-
DevID | Device ID (DevID) |
AxisIndex | Axis index |
- Returns
- Return an error code.
If the function is called successfully, the return value is ERR_NEXMOTION_SUCCESS (0). Otherwise, the return value is an error code. All error codes are defined in the header file, NexMotionError.h.
Usage:
Examples:
Reference:
NMC_AxisEnable() and NMC_AxisGetState()
Enable an axis.
- Parameters
-
DevID | Device ID (DevID) |
AxisIndex | Axis index |
- Returns
- Return an error code.
If the function is called successfully, the return value is ERR_NEXMOTION_SUCCESS (0). Otherwise, the return value is an error code. All error codes are defined in the header file, NexMotionError.h.
Usage:
- Before the axis motion, the function shall be called to drive the axis into the excitation.
- After the axis is excitation, the function will return successfully.
- If the axis is in the error state, the function will return the error code. After the error is resolved and the NMC_AxisResetState() is called, the function can be called to drive the axis into the excitation again.
Examples:
Reference:
NMC_AxisDisable(), NMC_AxisGetState(), and NMC_AxisResetState()
Get the axis servo alarm code.
- Parameters
-
| DevID | Device ID (DevID) |
| AxisIndex | Axis index |
[out] | PRetAlmCode | [Output] The value of alarm code. |
- Returns
- Return an error code.
If the function is called successfully, the return value is ERR_NEXMOTION_SUCCESS (0). Otherwise, the return value is an error code. All error codes are defined in the header file, NexMotionError.h.
Usage:
Examples:
Reference:
NMC_AxisGetStatus(), NMC_AxisResetState()
Get the state of the axis.
- Parameters
-
DevID | Device ID (DevID) |
AxisIndex | Axis Index |
PRetAxisState | Return the axis state. |
- Returns
- Return an error code.
If the function is called successfully, the return value is ERR_NEXMOTION_SUCCESS (0). Otherwise, the return value is an error code. All error codes are defined in the header file, NexMotionError.h.
Usage:
- The function can be called in a periodic procedure to confirm the current axis state.
- Before being in motion or executing the Homing procedure, the axis shall be excitation. After NMC_AxisEnable() is called, NMC_AxisGetState() can be called to confirm the axis is excitation.
- If the axis is in the error state or not stopped normally, and NMC_AxisResetState() is called, NMC_AxisGetState() can be called to confirm the axis error state is resolved.
Examples:
Reference:
NMC_AxisGetStatus() NMC_AxisEnable() NMC_AxisResetState()
Get the status of the axis.
- Parameters
-
DevID | Device ID (DevID) |
AxisIndex | Axis Index |
PRetAxisStatus | Return the axis status |
- Returns
- Return an error code.
If the function is called successfully, the return value is ERR_NEXMOTION_SUCCESS (0). Otherwise, the return value is an error code. All error codes are defined in the header file, NexMotionError.h.
Usage:
Examples:
Reference:
NMC_AxisGetState()
Reset the axis servo alarm.
- Parameters
-
DevID | Device ID (DevID) |
AxisIndex | The index of the axis will be reset. |
- Returns
- Return an error code.
If the function is called successfully, the return value is ERR_NEXMOTION_SUCCESS (0). Otherwise, the return value is an error code. All error codes are defined in the header file, NexMotionError.h.
Usage:
- When an alarm of axis drive is issued, the drive will automatically release the excitation in general. After the error is resolved, the function can be called to reset the alarm, and NMC_AxisGetStatus() can be called to get the axis status for the confirmation of alarm reset.
- Unless all drive alarms can be reseted with the function, some drive alarms shall be reseted by means of reengerization.
- After the function is called to reset the drive alarms successfully, the axis state can not be reset from the error state, unless NMC_AxisResetState() is called to reset the axis to the nonexcitation (AXIS_STATE_DISABLE).
Examples:
Reference:
NMC_AxisGetStatus() NMC_AxisResetState()
Reset the state of the axis.
- Parameters
-
DevID | Device ID (DevID) |
AxisIndex | Axis Index |
- Returns
- Return an error code.
If the function is called successfully, the return value is ERR_NEXMOTION_SUCCESS (0). Otherwise, the return value is an error code. All error codes are defined in the header file, NexMotionError.h.
Usage:
- If an axis is in the error state, or an aix is requested with a forced stop command and has stopped, the function can be called to reset the axis to the nonexcitation state or the normal excitation state. NMC_AxisGetState() can be called to confirm the axis is normal.
- If the axis drive is in the alarm state and the function is called, the device will reset the alarm automatically. After the error is resolved, the axis state will trafer to the nonexcitation state from the error state (AXIS_STATE_ERROR).
- If an axis is requested with a forced stop command and has stopped, the function can be called to reset the axis to nonexcitation state (AXIS_STATE_STAND_STILL).
Examples:
Reference:
NMC_AxisGetState() NMC_AxisResetDriveAlm()