.. _get_current_velx: get_current_velx ------------------------------------------ This function retrieves the **current task-space velocity** of the robot from the controller. It provides the instantaneous linear and angular velocity of the TCP (Tool Center Point) expressed in the task coordinate frame. **Definition** |br| ``DRFLEx.h`` within class `CDRFLEx`, public section .. code-block:: cpp LPROBOT_VEL get_current_velx() { return _get_current_velx(_rbtCtrl); }; **Parameter** |br| None **Return** .. list-table:: :widths: 25 75 :header-rows: 1 * - **Value** - **Description** * - :ref:`LPROBOT_VEL ` - Pointer to a structure containing the current TCP velocity values. |br| Includes both **linear (vx, vy, vz)** and **angular (wx, wy, wz)** components [mm/s, deg/s]. .. note:: Returns the most recent monitoring value. All fields are 0 until monitoring data has been received: after open_connection, after setup_monitoring_version, and after a reconnect. The returned pointer is never NULL. Before using the value, wait for the first monitoring callback after connecting. **Example** .. code-block:: cpp // Assume robot connection and initialization are complete LPROBOT_VEL lpVel = drfl.get_current_velx(); if (lpVel) { printf("Current TCP Velocity:\n"); printf("Linear [mm/s]: vx=%.4f vy=%.4f vz=%.4f\n", lpVel->_fVelocity[0], lpVel->_fVelocity[1], lpVel->_fVelocity[2]); printf("Angular [deg/s]: wx=%.4f wy=%.4f wz=%.4f\n", lpVel->_fVelocity[3], lpVel->_fVelocity[4], lpVel->_fVelocity[5]); } This example queries the controller for the robot’s **TCP linear and angular velocities**, prints them to the console, and can be used for real-time motion monitoring or velocity feedback control.