NRC_JobfileInsertPALON(int line, int id, int type, int var1=0, int var2=0, int var3=0)
Insert PALON 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
It needs to be used with NRC_JobfileInsertPALOFF(int line, int id, int var)
Type
int=>Insert PALON 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) |
id | int | The process number of the palletizing process, parameter range: 1 <= id <= 9 |
type | int | Palletizing type; 0: palletizing; 1: depalletizing |
var1 | int | The total number of currently palletized workpieces; 0 means no storage, 1-100 means variables GI001-GI100, parameter range: 0 <= var1 <= 100 |
var2 | int | The current number of palletized layers; 0 means no storage, 1-100 means variables GI001-GI100, parameter range: 0 <= var2 <= 100 |
var3 | int | The number of palletized workpieces on the current layer; 0 means no storage, 1-100 means variables GI001-GI100, parameter range: 0 <= var3 <= 100 |
Sample code
NRC_JobfileInsertPALCLEAR(1, 2);//Clear the previous palletizing data
NRC_JobfileInsertMOVJ(2, 50,50,50, P001, 4);//Move to inexbot1 in a point-to-point manner (pickup entry point)
NRC_JobfileInsertMOVL(3,50,50,50, P002, 1);//Move to inexbot2 in a straight line (pickup auxiliary point)
NRC_JobfileInsertMOVJ(4,50,50,50, P003, 1);//Move to inexbot3 in a point-to-point manner (pickup workpiece point)
NRC_JobfileInsertPALGRIPPER(5,2,1);
NRC_JobfileInsertPALGRIPPER(6,2,2);
NRC_JobfileInsertDOUT(7, 4, 1);//Digital output port 4 outputs high level
NRC_JobfileInsertPALON(8, 2,0, 10, 0, 0);//Palletizing process 2, palletizing, var1=10, var2=0, var3=0 (palletizing start judgment)
NRC_JobfileInsertPALENTER(9, 2, 1, 100,50,50, 5);//Palletizing process 2, joint interpolation, vel=100mm/s, PL=5 (palletizing entry point)
NRC_JobfileInsertPALSHIFT(10, 2,1, 50,50,50, 5);//Palletizing process 2, joint interpolation, vel=50mm/s, PL=5 (palletizing auxiliary point)
NRC_JobfileInsertPALREAL(11, 2, 1, 50,50,50, 5);//Palletizing process 2, joint interpolation, vel=50mm/s, PL=5 (palletizing workpiece point)
NRC_JobfileInsertDOUT(12, 3, 1);//Digital output port 3 outputs high level
NRC_JobfileInsertPALOFF(13,2,1);//Palletizing end judgment