For information on the latest version, please have a look at 1.33.5.
set_robot_speed_mode
This function sets the speed mode of the robot controller to normal speed (SPEED_NORMAL_MODE) or reduced speed (SPEED_REDUCED_MODE).
Definition
DRFLEx.h within class CDRFLEx, public section
bool set_robot_speed_mode(SPEED_MODE eSpeedMode) { return _set_robot_speed_mode(_rbtCtrl, eSpeedMode); };
Parameter
Parameter Name |
Data Type |
Default Value |
Description |
|---|---|---|---|
eSpeedMode |
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. |
Note
A return of true does not confirm that the controller applied the request. Confirm the result with the corresponding getter or callback (for example get_digital_output, get_robot_system, get_robot_speed_mode). If the value reported by the controller already equals the requested value, the function returns true immediately.
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.