Abb robotstudio programming movement

  • Hello everyone

    Currently i'm programming a robotized cells 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.

    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...

    I could need a long test-case with different MoveL instruction, so i could change the single offs for every robtarget but i don't like pretty much this option.

    Is there a better way to organize it? Or some inbuild function to help me?


  • AD
  • You could create an array of robtargets. In this way, there is only one "named" robtarget but it contains a different position for each part type. When you modify the position, it will ask you which element you would like to update.

    CONST robtarget pAtGrabPosition{3}:=[

    To go to the different positions you need to provide a number that corresponds to the data inside the array. This could be another num variable that gets updated based on something like a group input

    VAR num nPartType;
    MoveL pAtGrabPosition{nPartType},v200,fine,tool_Gripper\WObj:=wobj_Conveyor;

    In this way, the same movement instruction can be updated to go the correct position for each part type.

  • Offs will only affect whatever the current array element is. If you use something like:

    MoveL Offs(pAtGrabPosition{2},0,0,100),v200,z20,tool_Gripper\WObj:=wobj_Conveyor;

    Then the robot will move 100mm on the Z axis from the second robtarget in the array. If you were to hard-code the offset values into the Offs function, then the robot would move the same amount away from the taught positions. If you need to make different offset moves based on the part type, you could set something up like this:

    If the part type is 1, the robot will offset 30mm in X and 100mm in Z. If the part type is 2, offset 50 in X, 2 in Y, and 250 in Z. In this way, even if a new part type is added later on, you only need to add another CASE to set the correct offset amounts.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now