OptSearch_1D Restart?
Is it possible to create my own error handler with the OptSearch_1D search? I want to be able to restart a search automatically if I don't find a feature. Right now it stops and I don't get an error message to use in a handler. Normally I use something like this but it never gets to the error handler when using OptSearch_1D.
ERROR
ERROR
IF ERRNO=ERR_WHLSEARCH THEN
TPWrite "Measurement number " + ValToStr(nMeasCount) + " Missed.";
bMissed := TRUE;
RETRY;
ENDIF
ENDPROC
ENDPROC
0
Best Answer
-
So it seems the SearchL errors are not propagated by the OptSearch_1D instruction.
Have you tried using the CapSensorScan and SearchL instructions separately (the OptSearch_1D says it is a combination of these two)?5
Answers
-
You could try and add an ELSE to your IF statement and then put a STOP instruction as the ELSE result. Then if the cause of the error does look in the error handler, you could look at the value of ERRNO. As it obviously isn't ERR_WHLSEARCH, if it has a different error you can then handle that.
ERRORIF ERRNO=ERR_WHLSEARCH THENTPWrite "Measurement number " + ValToStr(nMeasCount) + " Missed.";bMissed := TRUE;RETRY;
ELSE
STOP;
! Now look at the ERRNO valueENDIF
ENDPROC0 -
pat.cliftion,
I gave that a try. No luck, it never leaves the instruction. It looks like ABB has incorporated a UIMessageBox that's got it stuck. The operator has to choose an option on the message box. The robot never goes to a stopped state.
Is it possible to disable UIMessageBox when in auto? Or possibly a way to close one down with a background task?0 -
Dont think you can disable the UIMessagebox, as its probably being called in the built in code of the instruction. If you know what variable is being checked in the message box, you may be able to get it close down, not sure. Problem with doing that may be that the robot then carries on its execution incorrectly.0
-
Graemepaulin,
That worked. Now i'm able to handle errors like I intended to. May put together a custom instruction to simplify what an operator sees. Thanks for the advice.
Teubert0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 249 ScreenMaker
- 2.7K Robot Controller
- 310 IRC5
- 59 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 785 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 4 Job listings