.. _manual_release_protective_stop: release_protective_stop (Manual Mode) ------------------------------------------ This section explains how to use :ref:`release_protective_stop ` during **Manual (Teach)** operations. This function releases the robot from a **protective stop state**, which occurs when a safety event or collision is detected. After the protective stop is cleared and verified, this command allows the robot to return to a normal operational state. **Typical usage** - Manually release the robot from a **protective or safety stop** condition after confirming it is safe to resume operation. - Reset safety-related errors (e.g., collision detection, protective zone violation) following inspection. - Resume motion or teaching once the stop condition has been cleared and acknowledged. .. Note:: - The robot must be in a **stopped and safe condition** before release can occur. - A protective stop (``STATE_SAFE_STOP``) pauses control without cutting servo power, so no servo-on call is needed after the release. A stop that cut servo power (``STATE_SAFE_OFF``) is cleared with :ref:`set_robot_control ` and ``CONTROL_SERVO_ON`` instead. **Example: Release protective stop and resume manual operation** .. code-block:: cpp // Preconditions: // - Connection established (open_connection) // - Manual (Teach) mode active // - Robot currently halted by a protective stop (collision, zone violation, etc.) // 1) Attempt to release protective stop if (drfl.release_protective_stop(RELEASE_MODE_RELEASE)) printf("[Protective Stop] Released successfully.\n"); else { printf("[Protective Stop] Release failed. Confirm safety conditions.\n"); return -1; } // 2) Wait for the robot state to return to idle while (drfl.check_motion() != 0) std::this_thread::sleep_for(std::chrono::milliseconds(200)); // 3) Resume manual jog or motion after verification float qTarget[6] = {0, -30, 90, 0, 90, 0}; drfl.movej(qTarget, 50, 50); drfl.mwait(); printf("[Protective Stop] Robot motion resumed.\n"); **Tips** - Always perform **visual inspection** and confirm safe clearance before calling this function. - If the release fails repeatedly, check safety configuration via :ref:`get_safety_configuration (DRCF v2) ` or :ref:`get_safety_configuration (DRCF v3) `. - If the robot is in ``STATE_SAFE_OFF``, call :ref:`set_robot_control ` with ``CONTROL_SERVO_ON`` before motion can resume. - Combine with :ref:`set_safety_mode ` for complete recovery procedures after safety events.