amove_spiral (Auto Mode)

As an asynchronous version of move_spiral, this function initiates the spiral motion and immediately returns without waiting for completion. It allows other program lines to execute while the spiral motion continues in the background. Since a new motion command issued before amove_spiral() terminates may cause an error, it is recommended to use mwait() between motions for safe sequencing.

Definition (Maximum Radius / Length)
DRFLEx.h within class CDRFLEx, public section (line 805)

bool amove_spiral(TASK_AXIS eTaskAxis,
                  float fRevolution,
                  float fMaximuRadius,
                  float fMaximumLength,
                  float fTargetVel[2],
                  float fTargetAcc[2],
                  float fTargetTime = 0.f,
                  MOVE_REFERENCE eMoveReference = MOVE_REFERENCE_TOOL) {
    return _amove_spiral(_rbtCtrl, eTaskAxis, fRevolution, fMaximuRadius,
                         fMaximumLength, fTargetVel, fTargetAcc,
                         fTargetTime, eMoveReference);
};

Parameter

Parameter Name

Data Type

Default Value

Description

eTaskAxis

TASK_AXIS

Axis perpendicular to the spiral surface (defines the rotation plane of the spiral)

fRevolution

float

Total number of spiral turns [revolutions]

fMaximuRadius

float

Final spiral radius [mm]

fMaximumLength

float

Distance moved along the axis direction [mm] (negative = opposite direction)

fTargetVel

float[2]

Linear velocity and angular velocity [mm/s, deg/s]

fTargetAcc

float[2]

Linear acceleration and angular acceleration [mm/s2, deg/s2]

fTargetTime

float

0.0

Total motion execution time [sec]

eMoveReference

MOVE_REFERENCE

MOVE_REFERENCE_TOOL

Coordinate frame reference for the spiral motion (BASE / TOOL)


Definition (Target Position)
DRFLEx.h within class CDRFLEx, public section (line 806)

bool amove_spiral(TASK_AXIS eTaskAxis,
                  float fRevolution,
                  float fTargetPos[3],
                  float fTargetVel[2],
                  float fTargetAcc[2],
                  float fTargetTime = 0.f,
                  MOVE_REFERENCE eMoveReference = MOVE_REFERENCE_TOOL,
                  MOVE_MODE eMoveMode = MOVE_MODE_ABSOLUTE,
                  SPIRAL_DIR eSpiralDir = DR_SPIRAL_OUTWARD,
                  ROT_DIR eRotDir = DR_ROT_FORWARD) {
    return _amove_spiral_ex(_rbtCtrl, eTaskAxis, fRevolution, fTargetPos,
                            fTargetVel, fTargetAcc, fTargetTime, eMoveReference,
                            eMoveMode, eSpiralDir, eRotDir);
};

This overload defines the spiral endpoint using X, Y, Z coordinates instead of maximum radius and length. It also adds control over spiral direction, rotation direction, and move mode (absolute/relative). It internally calls _amove_spiral_ex instead of _amove_spiral.

Parameter

Parameter Name

Data Type

Default Value

Description

eTaskAxis

TASK_AXIS

Axis perpendicular to the spiral surface (defines the rotation plane of the spiral)

fRevolution

float

Total number of spiral turns [revolutions]

fTargetPos

float[3]

Target point as X, Y, Z coordinates [mm]
(replaces fMaximuRadius / fMaximumLength)

fTargetVel

float[2]

Linear velocity and angular velocity [mm/s, deg/s]

fTargetAcc

float[2]

Linear acceleration and angular acceleration [mm/s2, deg/s2]

fTargetTime

float

0.0

Total motion execution time [sec]

eMoveReference

MOVE_REFERENCE

MOVE_REFERENCE_TOOL

Coordinate frame reference for the spiral motion (BASE / TOOL)

eMoveMode

MOVE_MODE

MOVE_MODE_ABSOLUTE

Movement basis (absolute or relative)

eSpiralDir

SPIRAL_DIR

DR_SPIRAL_OUTWARD

Radial direction of the spiral
DR_SPIRAL_OUTWARD: expand outward from center
DR_SPIRAL_INWARD: contract inward toward target

eRotDir

ROT_DIR

DR_ROT_FORWARD

Rotation direction along the axis
DR_ROT_FORWARD: forward rotation (+)
DR_ROT_REVERSE: reverse rotation (-)

Note

  • fRevolution defines the number of turns for the spiral path.

  • fMaximuRadius specifies the outermost radius reached during motion.

  • fMaximumLength represents the travel distance along the spiral axis.

  • fTargetVel and fTargetAcc define the linear/angular motion profile.

  • When fTargetTime is set, the spiral follows time-based control, ignoring both fTargetVel and fTargetAcc.

  • eTaskAxis determines which plane the spiral expands in (e.g., XY for Z-axis selection).

  • eMoveReference determines whether motion is relative to the BASE or TOOL frame.

  • The motion termination must be confirmed using mwait() before executing the next command.

  • Online blending with other motions is not supported.

Caution

  • If the spiral’s computed angular acceleration exceeds the safe threshold, a safety error will be triggered. To prevent this, reduce fTargetVel, fTargetAcc, or fTargetTime.

Return

Value

Description

0

Error

1

Success

Example

// Trigger D-Out signal 3 seconds after the spiral motion begins
float rev = 3;      // Revolutions
float rmax = 30;    // Maximum radius [mm]
float lmax = 50;    // Length along Z-axis [mm]
float tvel[2] = {50, 50};
float tacc[2] = {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);

This example performs an asynchronous spiral motion along the Z-axis (in TOOL frame), gradually expanding the spiral radius up to 30 mm while ascending 50 mm. The digital output activates 3 seconds after the motion starts, and subsequent commands should wait for completion using mwait().