RobotStudio event

Returning to path after interrupt

Hi

We are a bunch of students trying to solve a problem with interrupt. Can anyone tell us if it is possible to make the robot reject its original trajectory when the interrupt cycle is finished, and continue to the next target?

I've added a drawing that can make my problem easier to understand. As you can see the robot is on its way to "target 1" when an interrupt occurs and it runs through the interrupt. After this i want the robot to go to "target 2" instead of continuing with "target 1" as the red arrow shows.

We have a solution for this, but it requires that we start the program over. What we want is a solution where it is automated. Any help would be appreciatedA?

image

Comments

  • Hello,
    You can check out the ClearPath instruction, this should point you in the right direction.

     

    Good luck!

     

    BR

    frpa
  • Thanks for your reply. I've already tried ClearPath, but the program seems to stall in the interrupt, and will not continue to the next instruction. I think it is because i'm using collision set to generate the interrupt, and when i return to the program, the robot is stuck and will not move. The solution for this is to use exitcycle, but the program needs to be restarted manually. I browsed the forum a bit, and found that i have to use multitasking to avoid this. Is this true?

  • What do you mean by "collision set" to generate the interrupt? Please explain in more detail.

     
    frpa2010-04-09 13:25:12
  • I have a robot station with a tool and a workpiece, in this case a table. Whenever the tool comes in contact with the table, robotstudio detects the collision. I set an event that will activate a signal when this happens, and use this signal to generate the interrupt. Unless i use exitcycle, the programpointer goes back to my main program, but the tool stays in contact with the table, and the robot will not move. I hope this cleared something up?
  • I have a few other questions for you:

    o Is the robot still in Motors On after the collision?

    o What e-log messages do you get after the collision?

    o Does the robot back away at all after the collision?

    o What are your collision detection settings?

     

    BR frpa
  • Yes Motors are on, the messages i get are:

    • Collision in CollisionSet_1 between Bord_med_sirkulaert_hull and Tool 1 A?
      Program pointer has been resetA?
      Regain start A?
      Regain ready A?
      Program startedA?
      Program stoppedA?

    Description:The task T_ROB1 has stopped. The reason is that an external or internal stop has occured.

    The robot stops completely after the collision and does not back away. The system is set up with two events. One that generates a signal when contact is made, and one to return the signal to zero when the contact cease.

    Here is a copy of my program, note that it does not make any difference with of without StorePath:

    image


  • If anyone was wondering. The solution is simple enough, just run the program in continous mode, and use Stop; at the end of the program. Even so, we are looking at other possibilities than interrupt to solve our problem.

  • Uiastud, I have something like this in my application. Here I have an "Enable" button that enables a new move or stops an ongoing one. I remember I had some bad times with ClearPath and StatMove instructions. I remember that I tried some combinations of instructions until I found one that leaded me to the desired operation. Comparing your programa with mine I found some little differences. I may be nothing but in some cases, reordering the instructions resulted in a real difference.

     So, here it is the piece of code that stops the move:

        StopMove Quick;
        CurrentPosition := CRobT(Tool:=tToolR1 WObj:=wOrgR1);
    ! Here I save the path if I want to recover it later
        StorePath;
        ClearPath;


    Hehe is where I recover the robot to its last position after moving the robot to any other position, an put the robot moving again. If you don't want to back to the path, just delete the RestoPath instruction:

        MoveJ CurrentPosition ID:= SyncID_Approach, ApxVel, fine, tToolR1WObj:=wOrgR1;
        RestoPath;
        StartMove;

     With this code I could run the program in manual or automatic mode, stop the motion, move the robot to other point and recover the previous path if I needed.
     I hope it helps you a little.

     Leo
  • Hi, even though I use Multitasking, this is still an issue. The program pointer got stacked at the move instruction if I use `ClearPath`. Are there any ways to go to the next instruction after the interruption without using StorePath/RestoPath? I just want to move on to the next instruction.
  • lemster68
    lemster68 ✭✭✭
    Maybe you could enable the collision detection error handling.  Following how you handle it in your error handler then TRYNEXT;  Good luck.
    Lee Justice