You're reading the documentation for an older, but still supported version (1.33.4).
For information on the latest version, please have a look at 1.33.5.

move_spiral (Auto Mode)

This function moves the robot along a spiral in the plane perpendicular to the selected axis (eTaskAxis) while it also travels along that axis. The spiral starts at the current position and expands outward until it reaches the maximum radius and the axial length.

movespiral

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

bool move_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 _move_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 rotation plane for the spiral path)

fRevolution

float

Total number of spiral revolutions [rev > 0]

fMaximuRadius

float

Final spiral radius [mm]

fMaximumLength

float

Linear distance moved along the spiral axis [mm]
(negative value = reverse direction)

fTargetVel

float[2]

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

fTargetAcc

float[2]

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

fTargetTime

float

0.0

Total execution time [sec]

eMoveReference

MOVE_REFERENCE

MOVE_REFERENCE_TOOL

Coordinate reference frame for spiral motion (BASE / TOOL)


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

bool move_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 _move_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 _move_spiral_ex instead of _move_spiral.

Parameter

Parameter Name

Data Type

Default Value

Description

eTaskAxis

TASK_AXIS

Axis perpendicular to the spiral surface
(defines rotation plane for the spiral path)

fRevolution

float

Total number of spiral revolutions [rev > 0]

fTargetPos

float[3]

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

fTargetVel

float[2]

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

fTargetAcc

float[2]

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

fTargetTime

float

0.0

Total execution time [sec]

eMoveReference

MOVE_REFERENCE

MOVE_REFERENCE_TOOL

Coordinate reference frame for 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 sets the number of rotations in the spiral trajectory.

  • fMaximuRadius defines the final radius of the spiral.

  • fMaximumLength specifies the distance traveled along the spiral axis, with negative values moving in the opposite axial direction.

  • fTargetVel and fTargetAcc control the linear and angular speed profiles.

  • When fTargetTime is provided, motion is timed and velocity/acceleration are ignored.

  • eTaskAxis selects which plane the spiral lies on (e.g., TASK_AXIS_Z for XY-plane spirals).

  • eMoveReference defines the reference frame (BASE or TOOL).

  • This function does not support online blending with other motion commands.

movespiral_overview2

Caution

  • If the rotating acceleration generated by the spiral exceeds a safe limit, the system may trigger an error for protection. Reduce fTargetVel or fTargetAcc, or increase fTargetTime, accordingly.

Return

Value

Description

0

Error

1

Success

Note

Returns false without a message when the robot is in STATE_EMERGENCY_STOP, STATE_SAFE_OFF, STATE_SAFE_OFF2, STATE_SAFE_STOP or STATE_SAFE_STOP2.

Example

// Perform a spiral motion along the TOOL-Z axis
float rev = 3;       // 3 full rotations
float rmax = 30;     // Maximum radius: 30 mm
float lmax = 50;     // Moves 50 mm in Z-axis direction
float tvel[2] = {50, 50};    // Linear/Angular velocity
float tacc[2] = {100, 100};  // Linear/Angular acceleration

drfl.move_spiral(TASK_AXIS_Z, rev, rmax, lmax, tvel, tacc);
// Moves the robot in a spiral expanding outward (radius 30 mm)
// while ascending 50 mm along the Z-axis over 3 turns.

This command is commonly used for polishing, surface scanning, or coating applications where a smooth helical trajectory with radial expansion is required.