release_protective_stop

This function releases the protective stop state in the robot controller. When a protective stop is triggered due to a collision, external safety device, or system fault, this function clears the stop condition and allows the robot to resume operation.

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

bool release_protective_stop(RELEASE_MODE eReleaseMode)
{
    return _release_protective_stop(_rbtCtrl, eReleaseMode);
};

Parameter

Parameter Name

Data Type

Default Value

Description

eReleaseMode

RELEASE_MODE

Mode for releasing protective stop

Return

Value

Description

0

Error — failed to release protective stop

1

Success — protective stop released successfully

Example

// Enable auto safety move stop for protection
Drfl.set_auto_safety_move_stop(true);

// Simulate a motion task that might trigger a protective stop
float target[6] = {500, 200, 400, 180, 0, 180};
float vel[2] = {60, 60};
float acc[2] = {60, 60};
// Drfl.movej(target, vel, acc);

// Assume a collision or external force triggered a protective stop
std::this_thread::sleep_for(std::chrono::seconds(3));
printf("Protective stop triggered due to collision!\n");

// Release the protective stop condition
Drfl.release_protective_stop(RELEASE_MODE_RELEASE);
printf("Protective stop released. Resuming operation...\n");

// Re-enable servo to resume normal operation
// Drfl.servo_on(true);

This example demonstrates how to recover from a protective stop event triggered by an external collision or safety system. After calling release_protective_stop(RELEASE_MODE_RELEASE), the robot can safely resume motion by re-enabling the servo.