NexMotion  1.4.0
Open Robots & Machines [WIP]
Group_2D_Motion

Group 2D Line or Arc Interpolation Motion Functions. More...

Collaboration diagram for Group_2D_Motion:

Functions

RTN_ERR FNTYPE NMC_GroupLineXY (I32_T DevID, I32_T GroupIndex, _opt_null_ const F64_T *PX, _opt_null_ const F64_T *PY, const F64_T _opt_null_ *PMaxVel)
 Enable the group line interpolation motion on the XY plane from the current position to the target position in the Cartesian coordinate system. More...
 
RTN_ERR FNTYPE NMC_GroupCirc2R (I32_T DevID, I32_T GroupIndex, _opt_null_ const F64_T *PEX, _opt_null_ const F64_T *PEY, F64_T Radius, I32_T CW_CCW, _opt_null_ const F64_T *PMaxVel)
 Enable the group arc interpolation motion on the XY plane from the current position to the target position in the Cartesian coordinate system (radius method). More...
 
RTN_ERR FNTYPE NMC_GroupCirc2C (I32_T DevID, I32_T GroupIndex, _opt_null_ const F64_T *PEX, _opt_null_ const F64_T *PEY, _opt_null_ const F64_T *PCXOffset, _opt_null_ const F64_T *PCYOffset, I32_T CW_CCW, _opt_null_ const F64_T *PMaxVel)
 Enable the group arc interpolation motion on the XY plane from the current position to the target position in the Cartesian coordinate system (circle center method). More...
 
RTN_ERR FNTYPE NMC_GroupCirc2B (I32_T DevID, I32_T GroupIndex, _opt_null_ const F64_T *PEX, _opt_null_ const F64_T *PEY, _opt_null_ const F64_T *PBX, _opt_null_ const F64_T *PBY, _opt_null_ const F64_T *PMaxVel)
 Enable the group arc interpolation motion on the XY plane from the current position to the target position in the Cartesian coordinate system (pass-through method). More...
 
RTN_ERR FNTYPE NMC_GroupCirc2BEx (I32_T DevID, I32_T GroupIndex, _opt_null_ const F64_T *PEX, _opt_null_ const F64_T *PEY, _opt_null_ const F64_T *PBX, _opt_null_ const F64_T *PBY, _opt_null_ const F64_T *PAngleDeg, _opt_null_ const F64_T *PMaxVel)
 

Detailed Description

Group 2D Line or Arc Interpolation Motion Functions.

Todo:
Add description to NMC_GroupCirc2BEx function

Function Documentation

RTN_ERR FNTYPE NMC_GroupCirc2B ( I32_T  DevID,
I32_T  GroupIndex,
_opt_null_ const F64_T PEX,
_opt_null_ const F64_T PEY,
_opt_null_ const F64_T PBX,
_opt_null_ const F64_T PBY,
_opt_null_ const F64_T PMaxVel 
)

Enable the group arc interpolation motion on the XY plane from the current position to the target position in the Cartesian coordinate system (pass-through method).

The group state will transfer from GROUP_STAND_STILL to GROUP_MOVING. If the group reaches the target position (i.e. the velocity is decreased to 0), the group state will transfer to GROUP_STAND_STILL. The default maximum velocity will refer to the value in the input parameters. If required, the maximum velocity can be set in the API, and the specified value will be stored in the corresponding parameters automatically.

Parameters
DevIDDevice ID (DevID)
GroupIndexGroup index
[in]PEXA pointer variable to set the target position at X-axis. Input NULL (0) to ignore the parameter (not to move).
[in]PEYA pointer variable to set the target position at Y-axis. Input NULL (0) to ignore the parameter (not to move).
[in]PBXA pointer variable to set the pass-through point at X-axis. Input NULL (0) to ignore the parameter (not to move).
[in]PBYA pointer variable to set the pass-through point at Y-axis. Input NULL (0) to ignore the parameter (not to move).
[in]PMaxVelA pointer variable to set the maximum velocity. Input NULL (0) to ignore the parameter.
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:

I32_T devID = 0;
I32_T groupIndex = 0;
F64_T posTarX = 20.0;
F64_T posTarY = 20.0;
F64_T posBorX = 0.0;
F64_T posBorY = 20.0;
RTN_ERR ret = 0;
ret = NMC_GroupCirc2B( devID, groupIndex, &posTarX, &posTarY, &posBorX, &posBorY, NULL );
if( ret != 0 ) return ret;

Reference:
None.

RTN_ERR FNTYPE NMC_GroupCirc2C ( I32_T  DevID,
I32_T  GroupIndex,
_opt_null_ const F64_T PEX,
_opt_null_ const F64_T PEY,
_opt_null_ const F64_T PCXOffset,
_opt_null_ const F64_T PCYOffset,
I32_T  CW_CCW,
_opt_null_ const F64_T PMaxVel 
)

Enable the group arc interpolation motion on the XY plane from the current position to the target position in the Cartesian coordinate system (circle center method).

The group state will transfer from GROUP_STAND_STILL to GROUP_MOVING. If the group reaches the target position (i.e. the velocity is decreased to 0), the group state will transfer to GROUP_STAND_STILL. The default maximum velocity will refer to the value in the input parameters. If required, the maximum velocity can be set in the API, and the specified value will be stored in the corresponding parameters automatically.

Parameters
DevIDDevice ID (DevID)
GroupIndexGroup index
[in]PEXA pointer variable to set the target position at X-axis. Input NULL (0) to ignore the parameter (not to move).
[in]PEYA pointer variable to set the target position at Y-axis. Input NULL (0) to ignore the parameter (not to move).
[in]PCXOffsetA pointer variable to set the position of the circle center at X-axis. Input NULL (0) to ignore the parameter (not to move).
[in]PCYOffsetA pointer variable to set the position of the circle center at Y-axis. Input NULL (0) to ignore the parameter (not to move).
CW_CCWRotation direction of arc (0=CW; 1=CCW)
[in]PMaxVelA pointer variable to set the maximum velocity. Input NULL (0) to ignore the parameter.
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:

I32_T devID = 0;
I32_T groupIndex = 0;
F64_T posTarX = 20.0;
F64_T posTarY = 0.0;
F64_T posCenX = 10.0;
F64_T posCenY = 0.0;
I32_T cwCcw = 1;
RTN_ERR ret = 0;
ret = NMC_GroupCirc2C( devID, groupIndex, &posTarX, NULL, &posCenX, NULL, cwCcw, NULL );
if( ret != 0 ) return ret;

Reference:
None.

RTN_ERR FNTYPE NMC_GroupCirc2R ( I32_T  DevID,
I32_T  GroupIndex,
_opt_null_ const F64_T PEX,
_opt_null_ const F64_T PEY,
F64_T  Radius,
I32_T  CW_CCW,
_opt_null_ const F64_T PMaxVel 
)

Enable the group arc interpolation motion on the XY plane from the current position to the target position in the Cartesian coordinate system (radius method).

The group state will transfer from GROUP_STAND_STILL to GROUP_MOVING. If the group reaches the target position (i.e. the velocity is decreased to 0), the group state will transfer to GROUP_STAND_STILL. The default maximum velocity will refer to the value in the input parameters. If required, the maximum velocity can be set in the API, and the specified value will be stored in the corresponding parameters automatically.

Parameters
DevIDDevice ID (DevID)
GroupIndexGroup index
[in]PEXA pointer variable to set the target position at X-axis. Input NULL (0) to ignore the parameter (not to move).
[in]PEYA pointer variable to set the target position at Y-axis. Input NULL (0) to ignore the parameter (not to move).
RadiusRadius of arc (negative value indicates the larger radian path).
CW_CCWRotation direction of arc (0=CW; 1=CCW)
[in]PMaxVelA pointer variable to set the maximum velocity. Input NULL (0) to ignore the parameter.
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:

I32_T devID = 0;
I32_T groupIndex = 0;
F64_T posX = 50.0;
F64_T posY = 50.0;
F64_T radius = 25.0;
I32_T cwCcw = 1;
RTN_ERR ret = 0;
ret = NMC_GroupCirc2R( devID, groupIndex, &posX, &posX, radius, cwCcw, NULL );
if( ret != 0 ) return ret;

Reference:
None.

RTN_ERR FNTYPE NMC_GroupLineXY ( I32_T  DevID,
I32_T  GroupIndex,
_opt_null_ const F64_T PX,
_opt_null_ const F64_T PY,
const F64_T _opt_null_ PMaxVel 
)

Enable the group line interpolation motion on the XY plane from the current position to the target position in the Cartesian coordinate system.

The group state will transfer from GROUP_STAND_STILL to GROUP_MOVING. If the group reaches the target position (i.e. the velocity is decreased to 0), the group state will transfer to GROUP_STAND_STILL. The default maximum velocity will refer to the value in the input parameters. If required, the maximum velocity can be set in the API, and the specified value will be stored in the corresponding parameters automatically.

Parameters
DevIDDevice ID (DevID)
GroupIndexGroup index
[in]PXA pointer variable to set the target position at X-axis. Input NULL (0) to ignore the parameter (not to move).
[in]PYA pointer variable to set the target position at Y-axis. Input NULL (0) to ignore the parameter (not to move).
[in]PMaxVelA pointer variable to set the maximum velocity. Input NULL (0) to ignore the parameter.
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:

I32_T devID = 0;
I32_T groupIndex = 0;
F64_T posX= 10.0;
F64_T posY = 20.0;
RTN_ERR ret = 0;
ret = NMC_GroupLineXY( devID, groupIndex, &posX, &posY, NULL );
if( ret != 0 ) return ret;

Reference:
None.