NexMotion  1.4.0
Open Robots & Machines [WIP]
Axis_Motion_Termination

Axis Motion Termination Functions. More...

Collaboration diagram for Axis_Motion_Termination:

Functions

RTN_ERR FNTYPE NMC_AxisHalt (I32_T DevID, I32_T AxisIndex)
 The function can be called to halt the axis motion. More...
 
RTN_ERR FNTYPE NMC_AxisStop (I32_T DevID, I32_T AxisIndex)
 The function can be called to stop the axis motion. More...
 
RTN_ERR FNTYPE NMC_AxisHaltAll (I32_T DevID)
 The function can be called to halt the motions of all axes in a specified device normally. More...
 
RTN_ERR FNTYPE NMC_AxisStopAll (I32_T DevID)
 The function can be called to stop the motions of all axes in a specified device forcedly. More...
 

Detailed Description

Axis Motion Termination Functions.

Todo:
This group name is duplicated in pdf manual.

Check if need to rename.

Function Documentation

RTN_ERR FNTYPE NMC_AxisHalt ( I32_T  DevID,
I32_T  AxisIndex 
)

The function can be called to halt the axis motion.

Parameters
DevIDDevice ID (DevID)
AxisIndexAxis 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:

  1. When an axis is executing the point-to-point motion or JOG motion, the function can be called to stop the axis motion. The drive will decrease the velocity from the configuration in the axis parameter AXP_DEC to this in the AXP_V_BASE.
  2. If the axis is homing, the function will return the error code.
  3. If the axis is in the axis state_STATE_STOPPING, AXIS_STATE_STOPPED or AXIS_STATE_ERROR, the function will return the error code.
  4. If the axis is in the axis state_STATE_DISABLE or AXIS_STATE_STAND_STILL, the function will not return any error code.
  5. If the axis parameter AXP_BUFF_PARAM is set to aborting, the function can be called to stop the axis motion normally. If the axis parameter AXP_BUFF_PARAM is set to buffered, the function can be called to wait the bit 8 of axis status to 1 (the completion of the previous motion) and then to stop the axis motion normally.
  6. After the function is called and the motion is stopped successfully, the axis state will transfer to AXIS_STATE_DISCRETE_MOTION. After the axis is stopped, the bit 8 and 9 of axis status will become 1, and the axis state will transfer to normal excitation (AXIS_STATE_STAND_STILL).

Examples:

RTN_ERR ret = 0;
ret = NMC_AxisHalt( 0, 0 );

Reference:

RTN_ERR FNTYPE NMC_AxisHaltAll ( I32_T  DevID)

The function can be called to halt the motions of all axes in a specified device normally.

Parameters
DevIDDevice ID (DevID)
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 usage is similar to this of NMC_AxisHalt(). The function can be called to stop the motions of all axes in a specified device normally.

Examples:

RTN_ERR ret = 0;
ret = NMC_AxisHaltAll( 0 );

Reference:
NMC_AxisHalt()

RTN_ERR FNTYPE NMC_AxisStop ( I32_T  DevID,
I32_T  AxisIndex 
)

The function can be called to stop the axis motion.

Parameters
DevIDDevice ID (DevID)
AxisIndexAxis 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:

  1. Whether an axis is executing each type of motion and such axis motion shall be stopped for some undesired cases, the function can be called to perform the forced stop procedure. The drive will decrease the velocity from the configuration in the axis parameter AXP_STOP_PROF_DEC to this in the AXP_V_BASE.
  2. If the axis is homing, the function will return the error code.
  3. After the function is called to perform the forced stop procedure and the axis has not stopped, the axis state will transfer to AXIS_STATE_STOPPING. After the axis is stopped, the bit 9 of axis status will become 1, and the axis state will transfer to AXIS_STATE_STOPPED.
  4. If the axis state is AXIS_STATE_STAND_STILL, it will transfer to AXIS_STATE_STOPPED after the function is called.
  5. After the function is called to perform the forced stop procedure and the axis has stopped, the axis is prohibited to execute any axis motion, until NMC_AxisResetState() is called to reset the axis to normal excitation (AXIS_STATE_STAND_STILL).

Examples:

RTN_ERR ret = 0;
ret = NMC_AxisStop( 0, 0 );

Reference:
NMC_AxisResetState()

RTN_ERR FNTYPE NMC_AxisStopAll ( I32_T  DevID)

The function can be called to stop the motions of all axes in a specified device forcedly.

Parameters
DevIDDevice ID (DevID)
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 usage is similar to this of NMC_AxisStop(). The function can be called to stop the motions of all axes in a specified device forcedly.

Examples:

RTN_ERR ret = 0;
ret = NMC_AxisStopAll( 0 );

Reference:
NMC_AxisStop()