.. _auto_amovej: amovej (Auto Mode) ------------------------------------------ As an asynchronous **movej**, this function operates the same as the :ref:`movej ` function except for not having the ``fBlendingRadius`` argument for blending. Due to its asynchronous nature, the command **returns immediately after motion starts**, allowing the next line of code to execute **without waiting** for the motion to complete. **Definition (Uniform Velocity/Acceleration)** |br| ``DRFLEx.h`` within class `CDRFLEx`, public section (line 773) .. code-block:: cpp bool amovej(float fTargetPos[NUM_JOINT], float fTargetVel, float fTargetAcc, float fTargetTime = 0.f, MOVE_MODE eMoveMode = MOVE_MODE_ABSOLUTE, BLENDING_SPEED_TYPE eBlendingType = BLENDING_SPEED_TYPE_DUPLICATE) { return _amovej(_rbtCtrl, fTargetPos, fTargetVel, fTargetAcc, fTargetTime, eMoveMode, eBlendingType); }; **Parameter** .. list-table:: :widths: 22 20 18 40 :header-rows: 1 * - **Parameter Name** - **Data Type** - **Default Value** - **Description** * - fTargetPos - float[6] - - - Target joint location for six axes * - fTargetVel - float - - - Velocity applied uniformly to all joints [deg/s] * - fTargetAcc - float - - - Acceleration applied uniformly to all joints [deg/s\ :sup:`2`] * - fTargetTime - float - 0.f - Reach Time [sec] * - eMoveMode - :ref:`MOVE_MODE ` - ``MOVE_MODE_ABSOLUTE`` - Refer to the Definition of Enumeration Type * - eBlendingType - :ref:`BLENDING_SPEED_TYPE ` - ``BLENDING_SPEED_TYPE_DUPLICATE`` - Refer to the Definition of Enumeration Type ---- **Definition (Per-Joint Velocity/Acceleration)** |br| ``DRFLEx.h`` within class `CDRFLEx`, public section (line 774) .. code-block:: cpp bool amovej(float fTargetPos[NUM_JOINT], float fTargetVel[NUM_JOINT], float fTargetAcc[NUM_JOINT], float fTargetTime = 0.f, MOVE_MODE eMoveMode = MOVE_MODE_ABSOLUTE, BLENDING_SPEED_TYPE eBlendingType = BLENDING_SPEED_TYPE_DUPLICATE) { return _amovej_ex(_rbtCtrl, fTargetPos, fTargetVel, fTargetAcc, fTargetTime, eMoveMode, eBlendingType); }; This overload allows specifying **independent velocity and acceleration limits for each joint axis**. It internally calls ``_amovej_ex`` instead of ``_amovej``. **Parameter** .. list-table:: :widths: 22 20 18 40 :header-rows: 1 * - **Parameter Name** - **Data Type** - **Default Value** - **Description** * - fTargetPos - float[6] - - - Target joint location for six axes * - fTargetVel - float[6] - - - Velocity limit for each joint axis [deg/s] * - fTargetAcc - float[6] - - - Acceleration limit for each joint axis [deg/s\ :sup:`2`] * - fTargetTime - float - 0.f - Reach Time [sec] * - eMoveMode - :ref:`MOVE_MODE ` - ``MOVE_MODE_ABSOLUTE`` - Refer to the Definition of Enumeration Type * - eBlendingType - :ref:`BLENDING_SPEED_TYPE ` - ``BLENDING_SPEED_TYPE_DUPLICATE`` - Refer to the Definition of Enumeration Type **Note** - When ``fTargetTime`` is specified, motion is processed based on ``fTargetTime`` while ignoring ``fTargetVel`` and ``fTargetAcc``. - Refer to the motion description of :ref:`movej ` for blending details according to ``eBlendingType`` and velocity/acceleration settings. **Return** .. list-table:: :widths: 20 80 :header-rows: 1 * - **Value** - **Description** * - 0 - Error * - 1 - Success **Example (Uniform Velocity/Acceleration)** .. code-block:: cpp // Example: Asynchronous joint-space motion with uniform vel/acc. #include "DRFLEx.h" using namespace DRAFramework; int main() { CDRFLEx drfl; float q0[6] = { 0.0f, 0.0f, 90.0f, 0.0f, 90.0f, 0.0f }; float q1[6] = { 90.0f, 0.0f, 90.0f, 0.0f, 90.0f, 0.0f }; float q99[6] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }; float jvel = 10.f; // Joint velocity [deg/s] float jacc = 20.f; // Joint acceleration [deg/s^2] // 1) Move to initial position synchronously drfl.movej(q0, jvel, jacc); // 2) Wait 3 seconds before next command Sleep(3000); // 3) Start asynchronous motion to q1 (no wait) drfl.amovej(q1, jvel, jacc); // 4) Wait for motion completion before next move drfl.mwait(); // 5) Move to home position after synchronization drfl.movej(q99, jvel, jacc); return 0; } **Example (Per-Joint Velocity/Acceleration)** .. code-block:: cpp // Example: Asynchronous joint-space motion with per-joint vel/acc. #include "DRFLEx.h" using namespace DRAFramework; int main() { CDRFLEx drfl; float q0[6] = { 0.0f, 0.0f, 90.0f, 0.0f, 90.0f, 0.0f }; float q1[6] = { 90.0f, 0.0f, 90.0f, 0.0f, 90.0f, 0.0f }; float q99[6] = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f }; float jvel[6] = { 10.f, 10.f, 10.f, 10.f, 10.f, 10.f }; // Per-joint velocity [deg/s] float jacc[6] = { 20.f, 20.f, 20.f, 20.f, 20.f, 20.f }; // Per-joint acceleration [deg/s^2] // 1) Move to initial position synchronously drfl.movej(q0, jvel, jacc); // 2) Wait 3 seconds before next command Sleep(3000); // 3) Start asynchronous motion to q1 (no wait) drfl.amovej(q1, jvel, jacc); // 4) Wait for motion completion before next move drfl.mwait(); // 5) Move to home position after synchronization drfl.movej(q99, jvel, jacc); return 0; } Both examples perform the same **asynchronous joint-space motion** sequence using ``amovej()``, synchronized with ``mwait()`` before continuing. The per-joint overload allows specifying independent velocity and acceleration limits for each axis, which is useful when joints travel different angular distances.