Axis Motion Change Functions.
More...
Axis Motion Change Functions.
Change Axis profile on the fly.
Override the acceleration of a single axis.
- Parameters
-
DevID | Device ID (Dev ID) |
AxisIndex | Axis index |
TargetAcc | Target acceleration |
- 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 only be called to change the target acceleration after the axis point-to-point motion (NMC_AxisPtp) or the axis JOG motion (NMC_AxisJog) is enabled.
- The input acceleration will be set to the axis parameter AXP_ACC.
- If the axis has reached the target velocity (bit 12 of axis status is 1), there is no any impact of the input acceleration on the current motion.
Examples:
Sleep(100);
if( !( status & 0x1000 ) )
{
}
Reference:
Override the deceleration of a single axis.
- Parameters
-
DevID | Device ID (Dev ID) |
AxisIndex | Axis index |
TargetDec | Target deceleration |
- 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 only be called to change the target deceleration after the axis point-to-point motion (NMC_AxisPtp) or the normal stop (NMC_AxisHalt) is enabled.
- The input deceleration will be set to the axis parameter AXP_DEC.
- If the axis point-to-point is enabled and the axis velocity is changed from the target velocity to the configured end velocity gradually (bit 11 of axis status is 1), there is no any impact of the input deceleration on the current motion.
- If the normal stop of axis (NMC_AxisHalt) is enabled and the axis has not stopped, the input deceleration will impact on the current motion
Examples:
Reference:
Override the velocity of a single axis.
- Parameters
-
DevID | Device ID (Dev ID) |
AxisIndex | Axis index |
TargetVel | Target 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 only be called to change the target velocity after the axis point-to-point motion (NMC_AxisPtp) or the axis JOG motion (NMC_AxisJog) is enabled.
- The target velocity input through the function will be effective to the current motion only, not to modify the axis parameter AXP_VM.
- If the JOG motion is enabled, the input target velocity can be reached, and the bit 8 of axis status will become to 1.
- If the point-to-point motion is enabled, the input target velocity may not be reached. To meet the specified target position and acceleration/deceleration, the drive will plan the practical velocity curve based on the input target velocity.
Examples:
Reference:
NMC_AxisPtp() NMC_AxisJog()