NRC_JobfileInsertMOVC(int line, int vel, int acc, int dec, const NRC_Position& target, int pl=0)
Insert MOVC instruction into the job file
Before calling this function, please call NRC_CreateJobfile(std::string jobname) or NRC_OpenJobfile(std::string jobname) to create or open a job file
Two MOVC instructions are required to execute
Type
int=>Insert MOVC instruction into the job file
Return value | Description |
---|---|
0 | The function is called successfully |
-101 | Invalid input parameter |
-102 | The target object does not exist. This typically occurs when the system initialization is incomplete, and calling other functions may return this value |
-103 | The target object is currently in an inoperable state |
Parameter Option
Parameter | Type | Description |
---|---|---|
line | int | The line number where the instruction will be inserted, parameter range: 0 < line < (NRC_GetJobfileLineSum()+1) |
vel | int | The running speed of the robot, expressed as the absolute speed of the TCP in millimeters per second (mm/s). Parameter range: vel > 1 |
acc | int | Robot running acceleration, as a percentage of the maximum acceleration for each joint of the robot. Parameter range: 0 < acc <= 100 |
dec | int | Robot running deceleration, as a percentage of the maximum deceleration for each joint of the robot. Parameter range: 0 < dec <= 100 |
target | const NRC_Position& | Robot motion target position, see NRC_Position for details |
pl | int | Smoothness, which refers to the smooth transition between the current and the next movement instructions. The higher the value of pl, the smoother the transition, but the greater the trajectory deviation. The range of the parameter is 0 <= pl <= 5 |
Sample code
NRC_Position target1={NRC_ACS,10,10,10,10,10,10};
NRC_Position target2={NRC_ACS,10,0,20,10,10,10};
NRC_Position target3={NRC_ACS,15,10,10,10,10,10};
NRC_JobfileInsertMOVL(1,50,5,5,target,5);//Insert MOVL instruction into the job file
NRC_JobfileInsertMOVC(2,50,5,5,target,5);//Insert MOVC instruction into the job file
NRC_JobfileInsertMOVC(3,50,5,5,target,5);
//Insert MOVC instruction into the job file, vel=50mm/s, acc=5, dec=5, PL=5