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
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
The controller applies this value only while real-time control is started with start_rt_control. A command sent before start_rt_control is ignored.
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 |
The command was sent. This does not confirm that the controller received or applied it. |
0 |
The command datagram could not be sent. |
Note
This function is asynchronous. It returns without waiting 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 warnings and errors are reported through set_on_log_alarm. set_on_rt_log_alarm reports only RT session messages, so register both callbacks.
Example
drfl.connect_rt_control("192.168.137.100", 12347);
// The controller applies this value only while real-time control is started.
// Input period 0: no input watchdog, because this example sends a single command.
std::string version = "v1.0";
drfl.set_rt_control_input(version, 0.0f, 4);
drfl.set_rt_control_output(version, 0.001f, 4);
drfl.start_rt_control();
// 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))
printf("Task-space acceleration limits set successfully.\n");
else
printf("Failed to apply task acceleration limits.\n");
drfl.disconnect_rt_control();
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.
It is recommended to define limits before starting real-time servo commands to avoid excessive acceleration or overshoot during motion blending.