Skip to main content

NRC_RunqueueInsertPALON(int id, int type, int var1=0, int var2=0, int var3=0)

Insert PALON instruction in the run queue

Before calling this function, please call NRC_CreateNoFlieRunqueue() to create a fileless run queue

It needs to be used with NRC_RunqueueInsertPALOFF(int id, int var)

Type

int=>Insert PALON instruction in the run queue

Return valueDescription
0The function is called successfully
-101Invalid input parameter
-102The target object does not exist. This typically occurs when the system initialization is incomplete, and calling other functions may return this value
-103The target object is currently in an inoperable state

Parameter Option

ParameterTypeDescription
idintThe process number of the palletizing process, parameter range: 1 <= id <= 9
typeintPalletizing type; 0: palletizing; 1: depalletizing
var1intThe total number of currently palletized workpieces; 0 means no storage, 1-100 means variables GI001-GI100, parameter range: 0 <= var1 <= 100
var2intThe current number of palletized layers; 0 means no storage, 1-100 means variables GI001-GI100, parameter range: 0 <= var2 <= 100
var3intThe 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_RunqueueInsertPALCLEAR( 2);//Clear the previous palletizing data
NRC_RunqueueInsertMOVJ(50,50,50, P001, 4);//Move to inexbot1 in a point-to-point manner (pickup entry point)
NRC_RunqueueInsertMOVL(50,50,50, P002, 1);//Move to inexbot2 in a straight line (pickup auxiliary point)
NRC_RunqueueInsertMOVJ(50,50,50, P003, 1);//Move to inexbot3 in a point-to-point manner (pickup workpiece point)
NRC_RunqueueInsertPALGRIPPER(2,1);
NRC_RunqueueInsertPALGRIPPER(2,2);
NRC_RunqueueInsertDOUT(4, 1);//Digital output port 4 outputs high level
NRC_RunqueueInsertPALON(2,0, 10, 0, 0);//Palletizing process 2, palletizing, var1=10, var2=0, var3=0 (palletizing start judgment)
NRC_RunqueueInsertPALENTER(2, 1, 100,50,50, 5);//Palletizing process 2, joint interpolation, vel=100mm/s, PL=5 (palletizing entry point)
NRC_RunqueueInsertPALSHIFT(2,1, 50,50,50, 5);//Palletizing process 2, joint interpolation, vel=50mm/s, PL=5 (palletizing auxiliary point)
NRC_RunqueueInsertPALREAL(2, 1, 50,50,50, 5);//Palletizing process 2, joint interpolation, vel=50mm/s, PL=5 (palletizing workpiece point)
NRC_RunqueueInsertDOUT(3, 1);//Digital output port 3 outputs high level
NRC_RunqueueInsertPALOFF(2,1);//Palletizing end judgment