RobotStudio event

Move until

I need to create a piece of RAPID code that allows me to move the robot but with a stop condition, i.e. a move until. The stop condition could be like the one performed by the if and the robot must stop when it is met. I can't find any command that allows me to do this and I don't understand how to do it with other commands. The program is for IRC5 but I am also interested in solutions for 6 and 7.

Thank you very much for your help.


Answers

  • Micky
    Micky ✭✭✭
    Hello,
    You could use the instruction SearchL and use a digital input or a CyclicBool as stop condition.

    You will find more information in the manual
  • I see that exist this Search command for lineal and circular movement. Are there exist some command for joint movement?

  • I see that exist one called SearchExtJ but i think that is not equivalent with SearchL or SearchC command in a joint version.

  • Hi
    I have used the SearchL instruction and I have memorized the event coordinates in a robtarget
    I have 2 additional questions
    1. How can I make the robot cancel the movement when it has reached the event and the program runs its course
    2. How can I send the value of the X coordinate of the memorized robtarget to a variable type num (I have used the instruction "n11MemX: = p11Mem.x;" but it gives me an error)
    
    Thanks for your help!!
  • Micky
    Micky ✭✭✭
    Hello Oscaridis,

    1. You have to use one of the optional switches \Stop, \PStop, or \SStop to stop the robot, otherwise, the movement will continue to the position specified in the ToPoint argument.

    2. You can assign the X coordinate to a numeric variable as follows:

    nPosX:=pSearch.trans.x;
  • Micky said:
    Hello Oscaridis,

    1. You have to use one of the optional switches \Stop, \PStop, or \SStop to stop the robot, otherwise, the movement will continue to the position specified in the ToPoint argument.

    2. You can assign the X coordinate to a numeric variable as follows:

    nPosX:=pSearch.trans.x;
    Hello Micky
    I was trying it yesterday and i got the value of the coordinate using the argument "trans"
    Im going to try the argument "\Stop" now.

    Thx!