set_accj_rt
This function sets the joint acceleration used by real-time joint commands:
servoj_rt: on DRCF v2, when the next command does not arrive before the robot reaches the target position, the robot decelerates to a stop with this acceleration. On DRCF v3,
servoj_rtdoes not use this value and stops with the joint acceleration limit of the safety settings. On both, it does not limit theservoj_rttrajectory.speedj_rt: if the acceleration of the motion exceeds this value, the controller reports an Info message, at most once per second, without limiting or stopping the motion. Every joint whose velocity changes needs a value above 0; otherwise the controller reports a warning.
Definition
DRFLEx.h within class CDRFLEx, public section
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] |
Joint acceleration [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.
On DRCF v2.12.5 or later and v3.7.0 or later, a value above five times the joint acceleration limit of the safety settings is reduced to that value.
On DRCF v2, if the value is 0,
servoj_rtstops with the joint acceleration limit of the safety settings instead.The value stays in effect until it is changed or the controller restarts. Ending the real-time control session does not reset it.
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();
// Joint acceleration [deg/s²]
float acc[6] = {100.f, 100.f, 100.f, 100.f, 100.f, 100.f};
if (drfl.set_accj_rt(acc))
printf("set_accj_rt sent.\n");
else
printf("set_accj_rt could not be sent.\n");
drfl.disconnect_rt_control();
This example sets the value to 100 deg/s² for every joint.
Tips
A lower value gives a longer, gentler stop when
servoj_rtcommands stop arriving.