.. _set_velx_rt: set_velx_rt ------------------------------------------ This function sets the **global task-space velocity limit** used in **real-time servo motion control**. It defines both the **linear** and **rotational** velocity bounds applied to task-level commands such as :ref:`servol_rt ` or :ref:`speedl_rt `. **Definition** |br| ``DRFLEx.h`` within class `CDRFLEx`, public section (line 594) .. code-block:: cpp bool set_velx_rt(float fTransVel, float fRotationVel = -10000) { return _set_velx_rt(_rbtCtrlUDP, fTransVel, fRotationVel); }; **Parameter** .. list-table:: :widths: 25 20 20 35 :header-rows: 1 * - **Parameter Name** - **Data Type** - **Default Value** - **Description** * - fTransVel - float - - - Task linear velocity limit [mm/s]. * - fRotationVel - float - -10000 - Task rotational velocity limit [deg/s]. |br| If set to **-10000**, it is automatically calculated based on the linear velocity limit. **Note** - If the **servo motion velocity** exceeds the global task-space limit, an **Info message** is generated by the controller. - The system continues motion, but logs this event for diagnostic purposes. - The default rotational velocity (if unspecified) is derived from the translational velocity to maintain proportional motion scaling. **Return** .. list-table:: :widths: 20 80 :header-rows: 1 * - **Value** - **Description** * - 1 - Success — task velocity limits successfully applied. * - 0 - Error — invalid parameters or communication issue. **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 task-space velocity limits float fTransVel = 100.0f; // Linear velocity [mm/s] float fRotationVel = 60.0f; // Rotational velocity [deg/s] // Apply task-space velocity limits for real-time servo motion if (drfl.set_velx_rt(fTransVel, fRotationVel)) std::cout << "Global task velocity limits set successfully." << std::endl; else std::cout << "Failed to set task velocity limits." << std::endl; drfl.disconnect_rt_control(); return 0; } This example defines a **maximum task-space velocity** of 100 mm/s for translation and 60 deg/s for rotation to ensure stable and safe real-time motion execution. **Tips** - Recommended for use with **speedl_rt** or **servol_rt** functions. - If only translational motion is required, set ``fRotationVel = -10000`` to auto-scale it. - Adjust limits based on application safety requirements or workspace constraints.