set_robot_speed_mode

This is a function for setting and changing the current operation robot system in the robot controller.

Definition
DRFLEx.h within class CDRFLEx, public section (line 728)

bool set_robot_speed_mode(SPEED_MODE eSpeedMode) { return _set_robot_speed_mode(_rbtCtrl, eSpeedMode); };

Parameter

Parameter Name

Data Type

Default Value

Description

eSpeedMode

SPEED_MODE

Target velocity mode to set.

Return

Value

Type

Description

0

int

Error — failed to change the speed mode.

1

int

Success — successfully changed the speed mode.

Example

if (drfl.get_robot_speed_mode() == SPEED_REDUCED_MODE) {
    // Changes the speed reduced mode to normal speed mode
    drfl.set_robot_speed_mode(SPEED_NORMAL_MODE);
}

This example checks whether the current robot controller is operating in speed-reduced mode. If it is, the function changes it to normal speed mode by calling set_robot_speed_mode(SPEED_NORMAL_MODE).

When executed successfully, the robot exits the reduced-speed state and operates at normal velocity, allowing full-speed motion execution while maintaining safe control through the speed mode management system.