.. _set_on_homming_completed: set_on_homming_completed ------------------------------------------ This function registers a callback function that automatically checks whether homing has been completed when the robot controller is in homing control mode. Use it to run your own code automatically when this event occurs. **Definition** |br| ``DRFLEx.h`` within class `CDRFLEx`, public section .. code-block:: cpp void set_on_homming_completed(TOnHommingCompletedCB pCallbackFunc) { _set_on_homming_completed(_rbtCtrl, pCallbackFunc); }; **Parameter** .. list-table:: :widths: 20 20 20 40 :header-rows: 1 * - **Parameter Name** - **Data Type** - **Default Value** - **Description** * - pCallbackFunc - :ref:`TOnHommingCompletedCB ` - - - Refer to definition of callback function **Return** |br| None .. note:: See :ref:`Rules for callback functions `. **Example** .. code-block:: cpp void OnHommingCompletedCB() { // Generates a message for the completion of homing printf("homing completed\n"); } drfl.set_on_homming_completed(OnHommingCompletedCB); When registered, this callback automatically executes after the **homing process is completed**. The example prints `"homing completed"` to the console.