RobotStudio event

SearchL recovery

This might sound like a strange question, but please bear with me.

In doing a SearchL instruction, it sometimes fails with ERR_WHLSEARCH which is fair enough, but when looking at the robot itself, the sensor would have triggered when motion has completed (maybe due to the part settling?).  I tried a recovery from the error handler but it didn't seem to work:

SearchLStop, diGripperPartOrient2Flanks, pSrchCompl, pSrchEnd, v100, GripperWObj:=wobjA;
..
..
IF ERRNO=ERR_WHLSEARCH THEN 

      WaitTime 1;
      IF (diGripperPartOrient2 = 0) THEN
          RETURN;
      ENDIF
ENDIF

where diGripperPartOrient2 is my input (which goes OFF at the trigger point, hence /Flanks).

This will avoid operators getting involved a lot of the time as this search failure ends up with this situation, where the part ends up in a suitable position to continue, but by this time the error handler has control.  Currently I have a handler which returns the tool to the start position and runs the same search again as per most of the examples in the documentation.

Am I missing something?

Comments

  • Moved to RobotWare forum.
    Henrik Berlin
    ABB
  • Have you tried this:
     

    IF ERRNO=ERR_WHLSEARCH THEN 
          WaitTime 1;
          IF (diGripperPartOrient2 = 0) THEN
              MoveL StartPosition,v100,fine......;

              RETRY;
          ENDIF
    ENDIF
    Best regards,
    Anders Spaak
    ABB Robotics
  • Yes, Anders - thats what I currently have.  The change of signal sometimes doesn't occur DURING the SearchL move, but on inspection has changed when the product has settled, so I just keep moving the product back and forth and getting nowhere.  I wanted to get round the RETRY as it wouldn't be needed.
     

    The trigger in the SearchL instruction is when diGripperPartOrient2 = 0
  • Try setting the searched position to the end position in the error handler if you find the error condition and the search sensor is OFF.

     

    Also if possible set your pSrchEnd deeper to avoid a found condition at the end.

     

    Slow the search down (you can invent your own vSearch data type and set it to 93mm/sec for example....

     

    If none of those work - set a flag in your error handler and handle the error in your calling procedure (splitting the procedures up) and re-search based on the fact you did not find the part at the expected position range and re-reange for a smaller search before deciding a part is not present or you have an aplication hardware problem.

     

    SearchLStop, diGripperPartOrient2Flanks, pSrchCompl, pSrchEnd, v100, GripperWObj:=wobjA;
    ..
    ..
    IF ERRNO=ERR_WHLSEARCH THEN 

          WaitTime 1;
          IF (diGripperPartOrient2 = 0) THEN

              pSrchCompl:=pSrchEnd;
              RETURN;
          ENDIF
    ENDIF

     

     

    Hope this helps...
    Thomas H. Johnston
    PACs Application Engineer
  • After some experimenting, the way that worked (jumping back from the Error handler routine to the next step in the main program) was to use the TRYNEXT command:
    IF ERRNO=ERR_WHLSEARCH THEN 
          WaitTime 1;
          IF (diGripperPartOrient2 = 0) THEN

              pSrchCompl:=pSrchEnd;
              TRYNEXT;
          ENDIF
    ENDIF

     

    Works a treat!  Thanks for the suggestions.