drl_resume

This function resumes the DRL program (task) currently paused in the robot controller.

Available in Auto mode only. In other modes the function returns false and prints “this command can only be used in auto mode. please change to auto mode as robot mode”. The mode check uses the value returned by get_robot_mode.

Definition
DRFLEx.h within class CDRFLEx, public section

bool drl_resume() {
    return _drl_resume(_rbtCtrl);
};

Parameter
None

Return

Value

Type

Description

0

int

Error

1

int

Success

Note

Returns false if the request was refused. A return of true does not confirm that the controller applied the request; get_robot_mode and get_program_state report the request made by this CDRFLEx instance, so they do not confirm it either. A refusal is reported through TOnLogAlarmCB.

Example

if (drfl.get_program_state() == DRL_PROGRAM_STATE_HOLD) {
    bool bResult = drfl.drl_resume();
    // Additional logic after resuming program...
}

This example resumes execution of a temporarily suspended DRL program. If the robot’s program state is in DRL_PROGRAM_STATE_HOLD, drl_resume() reactivates the DRL task that was paused using drl_pause.

This function is commonly used for controlled recovery of automatic tasks after an intentional pause or safety hold during operation.