speedl (Auto Mode)

It is an asynchronous motion command; the next command is executed as soon as the motion starts. This function performs Cartesian velocity control, following the most recent target TCP (Tool Center Point) velocity within the maximum speed and acceleration constraints of consecutive commands.

This API operates only in Auto (Run) mode. It is not available in Manual (Teach) mode.

Definition
DRFLEx.h within class CDRFLEx, public section

bool speedl(float fTargetVel[NUM_TASK],
            float fTargetAcc[2],
            float fTargetTime)
{
    return _speedl(_rbtCtrl, fTargetVel, fTargetAcc, fTargetTime);
}

Parameter

Parameter Name

Data Type

Default Value

Description

fTargetVel

float[6]

Target TCP velocity for six Cartesian axes [X, Y, Z, Rx, Ry, Rz].

fTargetAcc

float[2]

Translational and rotational acceleration [mm/s², deg/s²].

fTargetTime

float

Command duration [sec]. Automatically adjusted if infeasible. -10000 = not specified; the controller uses its automatic value.

Return

Value

Description

0

Failed

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.

A return of true does not confirm that the controller applied the request. Confirm the motion with get_current_posj, get_current_posx or the monitoring data callback.

Example

// Preconditions: Connected, servo ON, Auto mode active

// Define linear velocity and acceleration in Cartesian space
float jvel[6] = {10.f, 10.f, 10.f, 10.f, 10.f, 10.f};
float jacc[2] = {20.f, 20.f};

// Execute TCP velocity control
drfl.speedl(jvel, jacc, -10000.f);

Note

  • If fTargetTime is specified but cannot be maintained due to the maximum speed or acceleration condition, it is adjusted automatically and a notification message is displayed.

  • On DRCF v3.0 to v3.3, if no new command arrives within 0.1 s, the motion stops with an alarm. On DRCF v3.4 or later and on v2.12.x, the arm keeps the last target velocity until stop() or a zero-velocity command.

  • speedl is not linked with the change_operation_speed() function.

  • It is also not linked with force/stiffness control commands.

  • Recommended for smooth Cartesian velocity control, real-time motion streaming, or external controller synchronization.