RobotStudio event

Use the same MoveL with different data

Hello everyone

A? A? I want to create a program as effective as possible so I will use the same instruction with different data, as follow:

TEST product_select A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A?CASE1: A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? tGrip := tGripper1; A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? pPick := pPicking1;

CASE2: A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? tGrip := tGripper2; A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? pPick := pPicking2;

CASE3: A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? tGrip := tGripper3; A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? pPick := pPicking3;

ENDTEST

MoveL pPick, v1000, fine, tGrip;

A? A? There is no problem with tooldata (tGrip), because I select a product (CASE) after I change the Gripper.

A? A? The problem is : I must teach all of position (pPicking1, pPicking2, pPicking3). The way is : move both Robot and Program Pointer to MoveL pPick, v1000, fine, tGrip;A?then ModPos (modify position). Of course It is done in Manual Mode. While to select the CASE, It must run on Auto Mode.A?

A? A? The possibility : I go to ABB menu on Flexpendant, choose Inputs and Outputs, choose View, choose Digital Inputs and Simulate them to run the CASE1, CASE2 or CASE3. But I'm not sure when I run one CASE, pPick will really refer to the right one (i.e. when I run CASE1, pPick will refer to pPick1, etc.). So I make sure that I modify the right position. It's very important for me, because the robot handle the fragile bottles.

A? A? Maybe someone has handled the same case as I do, I hope He/She would like to share. Thank you.

Best Regard

Dhyan - Indonesia

A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A? A?

fear of GOD is the beginning of wisdom

Comments

  • Hello Dhyan,
    You may want to create a separate routine that only has positions in the configurations you want and use this routine to create and modify your positions.

     

    PROC MyPos()

    !product_select:=1;

    MoveL pPicking1, v1000, fine, tGripper1;


    !product_select:=2;


    MoveL pPicking2, v1000, fine, tGripper2;


    !product_select:=3;

    MoveL pPicking3, v1000, fine, tGripper3;

    ENDPROC

     

    You may also want to put the Routine and your robtarget declarations in a system module to keep them separated from your program module.

     

    BR

    Jim Proulx
  • Hello Jim ProulxA?Clap

    A? A? Thank you for your explanation, It's very usefull and helpfull for me.

    Let me clarify yours, you mean that I may create a procedure specially just for teaching my position.(i.e. PROC MyPos() ). So if I put it in my main procedure, I must uncomment (deactivate) that procedure when I run my program in Auto. Is that right?

    A? A? Enjoy your job today!

    Best Regard,

    Dhyan Wicaksono

    fear of GOD is the beginning of wisdom
  • Hello,

    If I understand the question right, you want to be able to run the robot in automatic, and stop the program to modify a position, and continue the program. Here is what I would do:

     

    PROC rPickCase()
    TEST product_select
    CASE1:
    tGrip :
    = tGripper1;
    pPick :
    = pPicking1;
    CASE2:
    tGrip :
    = tGripper2;
    pPick :
    = pPicking2;
    CASE3:
    tGrip :
    = tGripper3;
    pPick :
    = pPicking3;
    ENDTEST
    !
    IF bStopProgram=TRUE STOP;
    !
    MoveL pPick, v1000, fine, tGrip;
    !
    RETURN;
    !!!!!!!!!!!!!!!!!!!!
    !Teach Positions Here
    !product_select:=1;
    MoveL pPicking1, v1000, fine, tGripper1;
    !product_select:=2;
    MoveL pPicking2, v1000, fine, tGripper2;
    !product_select:=3;
    MoveL pPicking3, v1000, fine, tGripper3;
    ENDPROC

    The boolean bStopProgram can be toggled TRUE/FALSE by you. When set to true, the program will stop. I would then use Jim's good idea, but put the teach positions at the end of the same routine after the RETURN. You can then cursor down to the desired position and modify it, set your boolean back to FALSE, put the key in automatic and continue production.
  • Hello Shane Ziegle.

    A? A? Thank you for your idea. It helps me too much when I want to pause production, teach the position and continue the production. In other word I do a "Teaching during production".

    A? A? But, my goal is to make the effective program. Cause a good program must has 3 conditions:A?

    1. Minimize the tendency of error

    2. Easy to be understood by other

    3. Effective (as short as possible)

    A? A? My program can run, but It's too long and not effective cause there are duplicate procedures. I appreciate if Shane Ziegle, Jim Proulx or anyone gives me an advice. So we all can grow to be a good robot programmer.

    Best Regard

    DhyanA?

    dhyan2009-10-05 06:12:48
    fear of GOD is the beginning of wisdom
  • Hello Dhyan,
    The method you want to use is the most efficient. BUT it will not minimize errors or be easy to understand or necessarily be effective for the enduser.

    The problem comes when you want to do a ModPos. When you ModPos MoveL pPick, v1000, fine, tGrip; you are doing it for that one instance to pPick and not to the asssigned robotarget like pPick_bottle1. The next time you run the tool_select routine the change will be overwritten with the original values. That is why Shane and I suggest the separate Move instructions to ModPos. This requires you to stop the robot, go into manual, find the appropriate instruction and ModPos that instruction and then return to your original program. This can be done by the enduser if properly trained. This tends to increase errors and it is not easily understood. If you only have 5 products then you may want to eliminate the tool_select routine and have dedicated routines for pick and place of the product using the proper robtarget and tool. While it is not as efficient it may be less hassel for the end user.

    I have made a change in the teaching-position routine if you still decide to use the efficient method.

     

    Best Regards

    Jim Proulx

     


     
  • Hello Jim ProulxA?

    A? A? Thank you very much for your advice. Soon I will apply my program on the floor (onsite programming). I will see which one methode is better then.A?

    Best Regard

    Dhyan W.

    fear of GOD is the beginning of wisdom
  • You can use this metod 

    PROC rPickCase()

      !Select the right robtarget
      TEST product_select
        CASE 1:
          tGrip :=
    tGripper1;
          pPick :=
    pPicking1;
        CASE 2:
          tGrip :=
    tGripper2;
          pPick :=
    pPicking2;
        CASE 3:
          tGrip :=
    tGripper3;
          pPick :=
    pPicking3;
      ENDTEST

      

      !Program goes here
      MoveL
    pPick, v1000, fine, tGrip;

      !Save positions in the real robtarget after modpos
      TEST product_select
        CASE 1:
          pPicking1:=
    pPick;
        CASE 2:

          pPicking2:=
    pPick;
        CASE 3:

          pPicking3:=
    pPick;
      ENDTEST

    ENDPROC

     

    The downside on this metod is that you need to execute the program after you have done a modpos on pPick to save the positions again.

    If you made a modpos and after that puts pp on Main without running the program, the positions will not be saved.

     

    att.
  • Dear Rulv.

    A? A? Thank you very much for your attention and your advice for me. I'll try yours.

    Best Regard

    Dhyan W.

    fear of GOD is the beginning of wisdom