You're reading the documentation for an older, but still supported version (GL013300).
For information on the latest version, please have a look at GL013301.

drl_start

This is a function for executing the program (task) consisting of the DRL language in the robot controller.

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

bool drl_start(ROBOT_SYSTEM eRobotSystem, string strDrlProgram) {
    return _drl_start(_rbtCtrl, eRobotSystem, strDrlProgram.c_str());
};

Parameter

Parameter Name

Data Type

Default Value

Description

eRobotSystem

ROBOT_SYSTEM

Refer to the Definition of Enumeration Type

strDrlProgram

string

Program character string to execute.

Return

Value

Type

Description

0

int

Error

1

int

Success

Example

string strDrlProgram = "\r\n\
loop = 0\r\n\
while loop < 3\r\n\
    movej([10.00, 10.00, 10.00, 10.00, 10.00, 10.00], vel=60, acc=60)\r\n\
    movel([20.00, 20.00, 20.00, 20.00, 20.00, 20.00], vel=60, acc=60)\r\n\
    loop += 1\r\n\
end\r\n";

if (drfl.get_robot_state() == STATE_STANDBY) {
    if (drfl.get_robot_mode() == ROBOT_MODE_AUTONOMOUS) {
        // Automatic Mode
        ROBOT_SYSTEM eTargetSystem = ROBOT_SYSTEM_VIRTUAL;
        drfl.drl_start(eTargetSystem, strDrlProgram);
    }
}

Note

  • The robot operation state should be STATE_STANDBY, and the robot motions normally when the robot mode is automatic.

  • The DRL program should be made by referring to the programming manual document in the appendix.

This function enables execution of DRL-language motion tasks directly on the controller. It is primarily used for autonomous or batch task execution, with DRL commands defined in string form. Ensure that the controller is in standby and autonomous mode before invoking this function.