RobotStudio event

Checking A Routine Exists



Hello,
 
I'm programming an IRC5.14.03 robot which asks the operator what part they wish to process within the cell. After the operator inputs the part name, eg 101-028, the RAPID coding changes the name and runs routine Prt_101_028. The problem is that the operator could type the name incorrectly and so the robot would fail trying to run a routine which doesn't exists.
 
The routine name (Prt_101_028) is held in string %stRoutineName%. The robot is able to process above 500 parts.
 
I'm looking for a method which checks for the existance of the routine before trying to run it. If the routine doesn't exists then the robot simply asks for the part name again.
 
Is there anyway to check within the RAPID coding if routine %stRoutineName% exists within the system?
 
BR
Paul
BR
Paul330

Comments



  • Hello,
     
    Never mind guys, all sorted...................solution:
     
    ERROR
     
    IF ERRNO = ERR_REFUNKPRC THEN
              ......Ask Operator for new part name
              TRYNEXT;
    ENDIF
     
    BR
    Paul T
    BR
    Paul330
  • thanks for this.. I have the same problem. I will try this.