Hello everyone
Currently i’m programming a robotized cell with an Irb6700 and a conveyor. This cells need to manage different types of products and every one has a different grab position.
I was thinking on how i could organize the rapid code in the best way.
The first thing it came up in my mind is to create a function that return a robtarget “generalGrabPose” based on the product code and then use a single instruction MoveL to this robtarget.
Something like:
Pers num serialNumber;
Pers robtarget generalGrabPosition;
Pers robtarget grabPosition1, … , grabPosition10;
Test serialNumber
Case 1
generalGrabPose := grabPosition1;
Case 2
generalGrabPose := grabPosition2;
…
Case 10
generalGrabPose := grabPosition10;
Endtest
MoveL generalGrabPose, v100, fine, tool0, wobj0;
But on the other side, if i need to adjust an offset for the position with the flexpendant i can’t modify the single moveL instruction, otherwise i would change every position…
I could need a long test-case with different MoveL instruction, so i could change the single offs for every robtarget.
For example:
Test serialNumber
Case 1
MoveL offs(grabPosition1,0,0,0), v100, fine, tool0, wobj0;
Case 2
MoveL offs(grabPosition2,0,0,0), v100, fine, tool0, wobj0;
…
Case 10
MoveL offs(grabPosition10,0,0,0), v100, fine, tool0, wobj0;
Endtest
In this way, anyone could change the offset value to rapidly adjust a position, but i don’t like pretty much this option.
Is there a better way to organize it? Or some inbuild function to help me?
Thanks.
