Breadcrumbs

CDRFLEx.drl_start

Features

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

Parameter

Parameter Name

Data Type

Default Value

Description

eRobotSystem

enum.ROBOT_SYSTEM


Refer to the Definition of Constant and Enumeration Type

strDrlProgram

string


Program character string to execute

Return

Value

Description

0

Error

1

Success

Example

C++
string strDrlProgram = "\r\n\
loop = 0\r\n\
while loop < 3:\r\n\
 movej(posj(10,10.10,10,10.10), vel=60, acc=60)\r\n\
 movej(posj(00,00.00,00,00.00), vel=60, acc=60)\r\n\
 loop+=1\r\n\
movej(posj(10,10.10,10,10.10), vel=60, acc=60)\r\n";

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



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

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