.. _set_accj_rt: set_accj_rt ------------------------------------------ This function sets the **global joint acceleration limit** used during **real-time servo motion control**. |br| It defines the maximum allowable acceleration for all joints when executing real-time motion commands such as :ref:`servoj_rt ` or :ref:`speedj_rt `. **Definition** |br| ``DRFLEx.h`` within class `CDRFLEx`, public section (line 593) .. code-block:: cpp bool set_accj_rt(float acc[NUM_JOINT]) { return _set_accj_rt(_rbtCtrlUDP, acc); }; **Parameter** .. list-table:: :widths: 25 20 20 35 :header-rows: 1 * - **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, |br| 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** .. list-table:: :widths: 20 80 :header-rows: 1 * - **Value** - **Description** * - 1 - Success — global acceleration limit successfully applied. * - 0 - Error — invalid input or communication failure. **Example** .. code-block:: cpp #include "DRFLEx.h" #include 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 :ref:`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.