Hello everybody,
I have an idea and I hope you can help me with it. Currently I have to create the program for a palletisation cell with multiple products, each product having it's own palletisation matrix. Previously I did palletisation program where I stored the coordinates for each box on the layer in an array (a.e.: CONST num Product{3,3}:=[[X1,Y1,RZ1],[X2,Y2,RZ2],[X3,Y3,RZ3]];) where X would be the offset on X direction from the origin on wobj, Y the offset on Y and RZ the orientation of the object. With some additional variables I would do the program as following:
CONST num Product{3,3}:=[[X1,Y1,RZ1],[X2,Y2,RZ2],[X3,Y3,RZ3]];
VAR num Offs_X;
VAR num Offs_Y;
VAR num Rot_Z;
VAR num BoxNum;
Offs_X:=Product(BoxNum,1);
Offs_Y:=Product(BoxNum,2);
Rot_Z:=Product(BoxNum,3);
MoveL Offs(RelTool(Place,0,0,0\Rz:=Rot_Z),Offs_X,Offs_Y,Pallet layers),...
Now I was thinking at using multiple arrays with the same name but different number at the end (Product_1, Product_2, Product_3,...) and getting ths values from them something like this:
VAR num ProductID;
Offs_X:=Product_{Product_ID}(BoxNum,1);
Offs_Y:=Product_{Product_ID}(BoxNum,2);
Rot_Z:=Product_{Product_ID}(BoxNum,3);
I'm waiting for your feedback and help. Thank you for your help!
Best regards,
Claudiu