CDRFLEx.amove_spiral
Features
As an asynchronous move_spiral, it operates the same as the move_spiral() function except for the asynchronous process, and executes the next line by returning as soon as motion starts without waiting for the termination of motion.
A new motion command generated before the motion is terminated by amove_spiral() function causes errors for security reasons. Therefore, the termination of the amove_spiral() motion must be confirmed using the mwait() function between amove_spiral() and the following motion command before the new motion command is executed.
The radius increases in a radial direction and the robot moves in parallel with the rotating spiral motion in an axial direction. It moves the robot along the spiral trajectory on the surface that is perpendicular to the axis on the coordinate specified as eMoveReference and the linear trajectory in the axis direction.
Parameter
Parameter Name | Data Type | Default Value | Range | Description |
eTaskAxis | enum.TASK_AXIS | - | - | Refer to the Definition of Constant and Enumeration Type |
fRevolution | float | - | rev > 0 | Total number of revolutions [revolution] |
fMaximuRadius | float | - | rmax > 0 | Final spiral radius [mm] |
fMaximumLength | float | - | Distance moved in the axis direction [mm] | |
fTargetVel | float[2] | - | Linear Velocity, Angular Velocity | |
fTargetAcc | float[2] | - | Linear Acceleration, Angular Acceleration | |
fTargetTime | float | 0.0 | time ≥ 0 | Total execution time <sec> |
eMoveReference | enum.MOVE_REFERENCE | MOVE_REFERENCE_TOOL | Refer to the Definition of Constant and Enumeration Type |
Note
- fRevolution refers to the total number of revolutions of the spiral motion.
- fMaximuRadius refers to the maximum radius of the spiral motion.
- fMaximumLength refers to the parallel distance in the axis direction during the motion. A negative value means the parallel distance in the –axis direction.
- fTargetVel refers to the moving velocity of the spiral motion.
- fTargetAcc refers to the moving acceleration of the spiral motion.
- When fTargetTime is specified, values are processed based on fTargetTime , ignoring fTargetVel and fTargetAcc.
- eTaskAxis defines the axis that is perpendicular to the surface defined by the spiral motion.
- eMoveReference refers to the reference coordinate system defined by the spiral motion.
- This function does not support online blending of previous and subsequent motions.
Caution
- If the rotating angular acceleration calculated by the spiral path is too great, an error can be generated to ensure safe motion.
In this case, reduce the fTargetVel, fTargetAcc or fTargetTime value.
Return
Value | Description |
0 | Error |
1 | Success |
Example
// D-Out 3 seconds after the spiral motion begins
float rev = 3;
float rmax = 50;
float lmax = 50;
float tvel = { 50, 50 };
float tacc = { 100, 100 };
Drfl.amove_spiral(TASK_AXIS_Z, rev, rmax, lmax, tvel, tacc);
Sleep(3000);
drfl.set_digital_output(GPIO_CTRLBOX_DIGITAL_INDEX_1, 1);