NexMotion  1.4.0
Open Robots & Machines [WIP]
Deprecated_API

Deprecated functions. More...

Functions

RTN_ERR FNTYPE NMC_AxisSetVelRatio (I32_T DevID, I32_T AxisIndex, F64_T Percentage)
 Axis function for setting velocity ratio. More...
 
RTN_ERR FNTYPE NMC_AxisGetVelRatio (I32_T DevID, I32_T AxisIndex, F64_T *PPercentage)
 Axis function for getting velocity ratio. More...
 
RTN_ERR FNTYPE NMC_GroupSetVelRatio (I32_T DevID, I32_T GroupIndex, F64_T Percentage)
 Set the velocity percentage of a group from 0.0 ~ 100.0%. More...
 
RTN_ERR FNTYPE NMC_GroupGetVelRatio (I32_T DevID, I32_T GroupIndex, F64_T *PRetPercentage)
 Get the velocity percentage of a group from 0.0 ~ 100.0%. More...
 

Detailed Description

Deprecated functions.

Function Documentation

RTN_ERR FNTYPE NMC_AxisGetVelRatio ( I32_T  DevID,
I32_T  AxisIndex,
F64_T PPercentage 
)

Axis function for getting velocity ratio.

Parameters
DevIDDevice ID (DevID)
AxisIndexAxis index
[out]PPercentageReturn the velocity percentage.
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 is called to get the current velocity percentage.

Examples:

RTN_ERR ret = 0;
F64_T velRatio = 0.0;
ret = NMC_AxisGetVelRatio( 0, 0, &velRatio );

Reference:
None.

RTN_ERR FNTYPE NMC_AxisSetVelRatio ( I32_T  DevID,
I32_T  AxisIndex,
F64_T  Percentage 
)

Axis function for setting velocity ratio.

Parameters
DevIDDevice ID (DevID)
AxisIndexAxis index
[in]Percentage[Input] Velocity percentage
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 the axis is in motion, the function can be called to set the velocity percentage. The default value of the velocity percentage is 1.0.
  2. The input velocity percentage shall be more than or equal to 0, and less than 1.
  3. If the axis is in the axis state AXIS _STATE_STOPPING, AXIS_STATE_STOPPED or AXIS_STATE_ERROR, the function will return the error code.
  4. If the axis is homing, the function will return the error code.
  5. After the function is called to set the velocity percentage, the target velocity of the later axis motion shall be the input maximum velocity multiplied by such velocity percentage.
  6. If the axis is executing the point-to-point motion or the JOG motion and the function is called, the input velocity percentage will change the target velocity of the current motion.

Examples:

RTN_ERR ret = 0;
F64_T maxVel = 50.0;
ret = NMC_AxisJog( 0, 0, 1, &maxVel ); // Enable axis JOG motion at target velocity 50.
ret = NMC_AxisSetVelRatio( 0, 0, 0.5 ); // Change velocity percentage to target velocity 25.

Reference:
None.

RTN_ERR FNTYPE NMC_GroupGetVelRatio ( I32_T  DevID,
I32_T  GroupIndex,
F64_T PRetPercentage 
)

Get the velocity percentage of a group from 0.0 ~ 100.0%.

Parameters
DevIDDevice ID (DevID)
GroupIndexGroup index
[out]PRetPercentage[Input] A pointer variable, [Output] Velocity percentage.
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 percentage = 0.0;
RTN_ERR ret = 0;
ret = NMC_GroupGetVelRatio( devID, groupIndex, &percentage );
if( ret != 0 ) return ret;

Reference:
None.

RTN_ERR FNTYPE NMC_GroupSetVelRatio ( I32_T  DevID,
I32_T  GroupIndex,
F64_T  Percentage 
)

Set the velocity percentage of a group from 0.0 ~ 100.0%.

Todo:
check velocity percentage maximum value (100 or 1000).
Parameters
DevIDDevice ID (DevID)
GroupIndexGroup index
PercentageVelocity percentage to be set (0% ~ 100.0%)
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 percentage = 100.0;
RTN_ERR ret = 0;
ret = NMC_GroupSetVelRatio( devID, groupIndex, percentage );
if( ret != 0 ) return ret;

Reference:
None.