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

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

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 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))
    printf("Global joint acceleration limit set successfully.\n");
else
    printf("Failed to set acceleration limit.\n");

drfl.disconnect_rt_control();

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.