.. _movej_h2r: movej_h2r ------------------------------------------ This function moves the robot to a target position in joint space. It is a hold-to-run version of the movej command. It initiates the motion, which must be sustained by periodically calling the hold2run command. **Definition** |br| ``DRFLEx.h`` within class `CDRFLEx` .. code-block:: cpp bool movej_h2r(float fTargetPos[NUM_JOINT], float fTargetVel[NUM_JOINT], float fTargetAcc[NUM_JOINT], float fTargetTime = 0.f, MOVE_MODE eMoveMode = MOVE_MODE_ABSOLUTE, float fBlendingRadius = 0.f, BLENDING_SPEED_TYPE eBlendingType = BLENDING_SPEED_TYPE_DUPLICATE) { return _safe_movej_h2r(_rbtCtrl, fTargetPos, fTargetVel, fTargetAcc, fTargetTime, eMoveMode, fBlendingRadius, eBlendingType); }; **Parameter** |br| .. list-table:: :widths: 20 20 20 40 :header-rows: 1 * - **Parameter Name** - **Data Type** - **Default Value** - **Description** * - fTargetPos - float [NUM_JOINT] - - - Target joint angle (Unit: deg) * - fTargetVel - float [NUM_JOINT] - - - Target joint velocity (Unit: deg/s) * - fTargetAcc - float [NUM_JOINT] - - - Target joint acceleration (Unit: deg/s²) * - fTargetTime - float - - - Target arrival time (Unit: sec) * - eMoveMode - :ref:`MOVE_MODE ` - - - Motion mode * - fBlendingRadius - float - - - Blending radius (Unit: mm) * - eBlendingType - :ref:`BLENDING_SPEED_TYPE ` - - - Blending speed type **Return** .. list-table:: :widths: 10 20 70 :header-rows: 1 * - **Value** - **Type** - **Description** * - True - bool - Success * - False - bool - Fail **Example** .. code-block:: cpp CDRFLEx drfl; float target_pos[6] = {0, 0, 90, 0, 90, 0}; float target_vel[6] = {30.0, 30.0, 30.0, 30.0, 30.0, 30.0}; float target_acc[6] = {60.0, 60.0, 60.0, 60.0, 60.0, 60.0}; drfl.movej_h2r(target_pos, target_vel, target_acc); // Initiate hold2run motion while (!drfl.get_current_pos() == target_pos) { drfl._hold2run(); time.sleep(0.1); // Additional processing can be done here }