For information on the latest version, please have a look at GL013301.
set_accx_rt
This function sets the global task-space acceleration limit for real-time servo motion control. It defines both linear and rotational acceleration limits applied to task-level commands such as servol_rt or speedl_rt.
Definition
DRFLEx.h within class CDRFLEx, public section (line 595)
bool set_accx_rt(float fTransAcc, float fRotationAcc = -10000) {
return _set_accx_rt(_rbtCtrlUDP, fTransAcc, fRotationAcc);
};
Parameter
Parameter Name |
Data Type |
Default Value |
Description |
|---|---|---|---|
fTransAcc |
float |
Task linear acceleration limit [mm/s²]. |
|
fRotationAcc |
float |
-10000 |
Task rotational acceleration limit [deg/s²]. |
Note
If the servo motion acceleration exceeds the defined global task-space limit, an Info message is generated for diagnostic purposes.
This does not interrupt motion automatically, but warns the operator to prevent instability during real-time streaming.
The rotational acceleration is automatically scaled if not explicitly defined.
Return
Value |
Description |
|---|---|
1 |
Success — acceleration limits successfully applied. |
0 |
Error — invalid input parameter or UDP 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 task-space acceleration limits
float fTransAcc = 100.0f; // Linear acceleration [mm/s²]
float fRotationAcc = 50.0f; // Rotational acceleration [deg/s²]
// Apply global acceleration limits for real-time servo control
if (drfl.set_accx_rt(fTransAcc, fRotationAcc))
std::cout << "Task-space acceleration limits set successfully." << std::endl;
else
std::cout << "Failed to apply task acceleration limits." << std::endl;
drfl.disconnect_rt_control();
return 0;
}
This example sets the global task acceleration limit to 100 mm/s² for translation and 50 deg/s² for rotation, ensuring stable motion under real-time control.
Tips
Use together with set_velx_rt to maintain consistent dynamic behavior in Cartesian control.
Recommended to define limits before starting real-time servo commands to avoid excessive acceleration or overshoot during motion blending.