.. _manual_set_safety_mode: set_safety_mode (Manual Mode) ------------------------------------------ This section explains how to use :ref:`set_safety_mode ` during **Manual (Teach)** operations. This function sets the robot’s **safety operating mode** and determines how the robot behaves under specific safety conditions. It requests a safety mode (SAFETY_MODE) together with a safety-mode event (SAFETY_MODE_EVENT_ENTER, SAFETY_MODE_EVENT_MOVE or SAFETY_MODE_EVENT_STOP). **Typical usage** - Change the robot’s operating safety mode during manual setup or collaborative teaching. - Configure the robot’s response to safety triggers such as protective stops or external sensors. .. Note:: - The configured mode persists until modified or overridden by a new safety event. **Example: Enter manual safety mode for teaching** .. code-block:: cpp // Preconditions: // - Connection established (open_connection) // - Manual (Teach) mode active // - Servo power ON // 1) Enter manual safety mode for teaching if (drfl.set_safety_mode(SAFETY_MODE_MANUAL, SAFETY_MODE_EVENT_ENTER)) printf("[Safety Mode] Manual safety mode entered for teaching.\n"); else { printf("[Safety Mode] Failed to enter manual safety mode.\n"); return -1; } // 2) Perform safe manual motion float qTarget[6] = {0, -30, 90, 0, 90, 0}; drfl.movej(qTarget, 30, 20); drfl.mwait(); **Tips** - Always verify that the selected safety mode complies with site safety requirements. - Check the applied safety configuration using :ref:`get_safety_configuration (DRCF v2) ` or :ref:`get_safety_configuration (DRCF v3) `. - Combine with :ref:`change_collision_sensitivity ` and :ref:`release_protective_stop ` for a complete manual safety management routine.