NexMotion  1.4.0
Open Robots & Machines [WIP]
Axis_Homing

Axis Returns to Home Functions. More...

Collaboration diagram for Axis_Homing:

Functions

RTN_ERR FNTYPE NMC_AxisSetHomePos (I32_T DevID, I32_T AxisIndex, F64_T HomePos)
 Set the origin of a single axis in the axis coordination system. More...
 
RTN_ERR FNTYPE NMC_AxisHomeDrive (I32_T DevID, I32_T AxisIndex)
 Drive an axis to move to the origin (by driver). More...
 

Detailed Description

Axis Returns to Home Functions.

Function Documentation

RTN_ERR FNTYPE NMC_AxisHomeDrive ( I32_T  DevID,
I32_T  AxisIndex 
)

Drive an axis to move to the origin (by driver).

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. Before the axis motion, the function may be called to execute the homing procedure of axis in general, in order to drive the axis returns to the origin.
  2. The parameters related to homing are defined in the axis parameter table, including the homing methods, acceleration, velocity, offset, etc. Among these parameters, the methods shall be determined depended the methods supported by the drive.
  3. In case of any error occurred in the axis homing procedure, the bit 7 of the axis status will become to 1, and the axis will transfer to error state (AXIS_STATE_ERROR). In the case, after the axis stops completely (which can be determined by checking the bit 9 of axis status is 1), NMC_AxisResetDriveAlm() or NMC_AxisResetState() can be called to reset the axis to the normal state.
  4. After the axis completes the homing procedure, the bit18 of axis status will become to 1, and axis will transfer to normal excitation (AXIS_STATE_STAND_STILL).

Examples:

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

Reference:
None.

RTN_ERR FNTYPE NMC_AxisSetHomePos ( I32_T  DevID,
I32_T  AxisIndex,
F64_T  HomePos 
)

Set the origin of a single axis in the axis coordination system.

Parameters
DevIDDevice ID (DevID)
AxisIndexAxis Index
HomePosThe value to set the origin in the axis coordinate system (ACS).
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:
None.