Programming movement based on different product codes

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.

Comments

  • Forge_Engineering
    Forge_Engineering Mackay, QLD, Australia
    Hi Simone, 

    It looks like you can Modify position on the right hand side of the := operator but not the left, so you should be fine with your original plan if you select GrabPosition1 by itself:


    If I select the left hand side of the := operator I cannot modify it, but the right hand side as shown here I can.

    Does that work for you? 

    Regards,

    Harry
  • SimoneCosti
    SimoneCosti Italia
    Yes it works.
    Thanks for your feedback, i will stick to my first idea.