set_velj_rt
This function sets the global joint speed limit used during real-time servo motion control. It defines the maximum allowable joint velocity for all servo motion commands executed via the real-time control interface.
Definition
DRFLEx.h within class CDRFLEx, public section
bool set_velj_rt(float vel[NUM_JOINT]) {
return _set_velj_rt(_rbtCtrlUDP, vel);
};
Parameter
Parameter Name |
Data Type |
Default Value |
Description |
|---|---|---|---|
vel |
float[6] |
Global joint velocity limit [deg/s] applied during real-time control. |
Note
If the joint velocity commanded by a servo motion function
(e.g., servoj_rt or speedj_rt)
exceeds the defined global limit, an Info message is generated.This function does not stop motion automatically; it only logs or warns about the exceedance.
The limit is maintained until explicitly changed or the real-time control session is terminated.
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 global joint velocity limits [deg/s]
float vel[6] = {100.f, 100.f, 100.f, 100.f, 100.f, 100.f};
// Apply velocity limits for real-time servo motion
if (drfl.set_velj_rt(vel))
printf("Global joint velocity limit set successfully.\n");
else
printf("Failed to set velocity limit.\n");
drfl.disconnect_rt_control();
This example sets a uniform joint velocity limit of 100 deg/s to restrict motion speed during real-time servo operations.
Tips
Use this function before starting RT motion (e.g., before calling
servoj_rt).It helps prevent excessive joint velocity in unstable communication or high-frequency control.
The same configuration can be re-applied dynamically without restarting RT mode.