For information on the latest version, please have a look at GL013301.
set_accj_rt
This function sets the global joint acceleration limit used during
real-time servo motion control.
It defines the maximum allowable acceleration for all joints when executing
real-time motion commands such as servoj_rt or speedj_rt.
Definition
DRFLEx.h within class CDRFLEx, public section (line 593)
bool set_accj_rt(float acc[NUM_JOINT]) {
return _set_accj_rt(_rbtCtrlUDP, acc);
};
Parameter
Parameter Name |
Data Type |
Default Value |
Description |
|---|---|---|---|
acc |
float[6] |
Global joint acceleration limit [deg/s²] used for all real-time servo motion commands. |
Note
If the commanded acceleration during motion exceeds the global limit,
an Info message is generated by the controller.This does not stop motion automatically, but logs a warning for diagnostics.
The defined acceleration limit remains active until it is reset or the real-time control session ends.
Return
Value |
Description |
|---|---|
1 |
Success — global acceleration limit successfully applied. |
0 |
Error — invalid input or communication failure. |
Example
#include "DRFLEx.h"
#include <iostream>
using namespace DRAFramework;
int main() {
CDRFLEx drfl;
drfl.connect_rt_control("192.168.137.100", 12347);
// Define global joint acceleration limits [deg/s²]
float acc[6] = {100.f, 100.f, 100.f, 100.f, 100.f, 100.f};
// Apply the global acceleration limits for real-time servo motion
if (drfl.set_accj_rt(acc))
std::cout << "Global joint acceleration limit set successfully." << std::endl;
else
std::cout << "Failed to set acceleration limit." << std::endl;
drfl.disconnect_rt_control();
return 0;
}
This example applies a uniform acceleration limit of 100 deg/s² to restrict motion profiles during real-time servo control.
Tips
Always set both set_velj_rt and set_accj_rt before starting a new real-time control session to ensure safe joint behavior.
These limits help prevent high-frequency torque spikes and improve control stability during real-time motion streaming.