NexMotion  1.4.0
Open Robots & Machines [WIP]
Axis_Motion_Status

Axis Motion Status Functions. More...

Collaboration diagram for Axis_Motion_Status:

Functions

RTN_ERR FNTYPE NMC_AxisGetCommandPos (I32_T DevID, I32_T AxisIndex, F64_T *PRetCmdPos)
 Get the command position for desired axis. More...
 
RTN_ERR FNTYPE NMC_AxisGetActualPos (I32_T DevID, I32_T AxisIndex, F64_T *PRetActPos)
 Get the encoder feedback position for desired axis. More...
 
RTN_ERR FNTYPE NMC_AxisGetCommandVel (I32_T DevID, I32_T AxisIndex, F64_T *PRetCmdVel)
 Get the command velocity for desired axis. More...
 
RTN_ERR FNTYPE NMC_AxisGetActualVel (I32_T DevID, I32_T AxisIndex, F64_T *PRetActVel)
 Get the encoder feedback velocity for desired axis. More...
 
RTN_ERR FNTYPE NMC_AxisGetMotionBuffSpace (I32_T DevID, I32_T AxisIndex, I32_T *PRetFreeSpace)
 Get the quantity of motions segment which can still be stored into the axis motion queue. More...
 

Detailed Description

Axis Motion Status Functions.

Function Documentation

RTN_ERR FNTYPE NMC_AxisGetActualPos ( I32_T  DevID,
I32_T  AxisIndex,
F64_T PRetActPos 
)

Get the encoder feedback position for desired axis.

Parameters
DevIDDevice ID (DevID)
AxisIndexAxis index
[out]PRetActPosReturn the encoder feedback position. Unit: user unit.
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 to get the encoder feedback position for an axis.

Examples:

RTN_ERR ret = 0;
F64_T cmdPos = 0.0;
F64_T actPos = 0.0;
ret = NMC_AxisGetCommandPos( 0, 0, &cmdPos );
ret = NMC_AxisGetActualPos( 0, 0, &actPos );

Reference:

RTN_ERR FNTYPE NMC_AxisGetActualVel ( I32_T  DevID,
I32_T  AxisIndex,
F64_T PRetActVel 
)

Get the encoder feedback velocity for desired axis.

Parameters
DevIDDevice ID (DevID)
AxisIndexAxis index
[out]PRetActVelReturn the encoder feedback velocity. Unit: user unit/sec.
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 to get the encoder feedback velocity for an axis.

Examples:

RTN_ERR ret = 0;
F64_T cmdVel = 0.0;
F64_T actVel = 0.0;
ret = NMC_AxisGetCommandVel( 0, 0, &cmdVel );
ret = NMC_AxisGetActualVel( 0, 0, &actVel );

Reference:

RTN_ERR FNTYPE NMC_AxisGetCommandPos ( I32_T  DevID,
I32_T  AxisIndex,
F64_T PRetCmdPos 
)

Get the command position for desired axis.

Parameters
DevIDDevice ID (DevID)
AxisIndexAxis index
[out]PRetCmdPosReturn the command position. Unit: user unit.
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 to get the command position for an axis.

Examples:

RTN_ERR ret = 0;
F64_T cmdPos = 0.0;
F64_T actPos = 0.0;
ret = NMC_AxisGetCommandPos( 0, 0, &cmdPos );
ret = NMC_AxisGetActualPos( 0, 0, &actPos );

Reference:

RTN_ERR FNTYPE NMC_AxisGetCommandVel ( I32_T  DevID,
I32_T  AxisIndex,
F64_T PRetCmdVel 
)

Get the command velocity for desired axis.

Parameters
DevIDDevice ID (DevID)
AxisIndexAxis index
[out]PRetCmdVelReturn the command velocity. Unit: user unit/sec.
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 to get the command velocity for an axis.

Examples:

RTN_ERR ret = 0;
F64_T cmdVel = 0.0;
F64_T actVel = 0.0;
ret = NMC_AxisGetCommandVel( 0, 0, &cmdVel );
ret = NMC_AxisGetActualVel( 0, 0, &actVel );

Reference:

RTN_ERR FNTYPE NMC_AxisGetMotionBuffSpace ( I32_T  DevID,
I32_T  AxisIndex,
I32_T PRetFreeSpace 
)

Get the quantity of motions segment which can still be stored into the axis motion queue.

Parameters
DevIDDevice ID (DevID)
AxisIndexAxis index
[out]PRetFreeSpaceReturn the quantity of motions which can still be stored into the axis motion queue.
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:
Because the axis supports the motion queue , the function can be called to confirm the quantity of motions which can still be stored into the axis motion queue.

Examples:

RTN_ERR ret = 0;
I32_T space = 0;
ret = NMC_AxisGetMotionBuffSpace( 0, 0, &space );

Reference:
NMC_AxisPtp() NMC_AxisJog() NMC_AxisHalt()