set_velx_rt

This function sets the global task-space velocity limit used in real-time servo motion control. It defines both the linear and rotational velocity bounds applied to task-level commands such as servol_rt or speedl_rt.

Definition
DRFLEx.h within class CDRFLEx, public section

bool set_velx_rt(float fTransVel, float fRotationVel = -10000) {
    return _set_velx_rt(_rbtCtrlUDP, fTransVel, fRotationVel);
};

Parameter

Parameter Name

Data Type

Default Value

Description

fTransVel

float

Task linear velocity limit [mm/s].

fRotationVel

float

-10000

Task rotational velocity limit [deg/s].
If set to -10000, it is automatically calculated based on the linear velocity limit.

Note

  • If the servo motion velocity exceeds the global task-space limit, an Info message is generated by the controller.

  • The system continues motion, but logs this event for diagnostic purposes.

  • The default rotational velocity (if unspecified) is derived from the translational velocity to maintain proportional motion scaling.

Return

Value

Description

1

The command datagram was sent.

0

The command datagram could not be sent.

Note

This function is asynchronous. It returns as soon as the datagram is sent and does not wait for the controller to accept or reject the command, so a return value of 1 does not confirm that the robot acted on it. Rejected commands and motion faults are reported through set_on_rt_log_alarm.

Example

drfl.connect_rt_control("192.168.137.100", 12347);

// Define task-space velocity limits
float fTransVel = 100.0f;     // Linear velocity [mm/s]
float fRotationVel = 60.0f;   // Rotational velocity [deg/s]

// Apply task-space velocity limits for real-time servo motion
if (drfl.set_velx_rt(fTransVel, fRotationVel))
    printf("Global task velocity limits set successfully.\n");
else
    printf("Failed to set task velocity limits.\n");

drfl.disconnect_rt_control();

This example defines a maximum task-space velocity of 100 mm/s for translation and 60 deg/s for rotation to ensure stable and safe real-time motion execution.

Tips

  • Recommended for use with speedl_rt or servol_rt functions.

  • If only translational motion is required, set fRotationVel = -10000 to auto-scale it.

  • Adjust limits based on application safety requirements or workspace constraints.