Vision System Error handling
I am running a Cognex Vision system on the pc interface that will be looking at our part held by the robot to determine offsets for machining location. I want to have an error safety built in so if the robot fails to pick a part from the loader and the camera has an error (from not identifying a part), the robot goes back through the pick up procedure again. I have an if statement to check the output from the camera and i can get the arm to go pick up the part again but then when it leaves the if statement it, it does not continue the program. I need a way to basically start the PP to Main if it receives an error so it just restarts. What is the best way to do this? I want to run the machine lights off and want to make sure when i come in the next day it didn't miss a part and stop early in the cycle.
I have posted the a snip from my code but not sure the best way to post it here to review.
I have posted the a snip from my code but not sure the best way to post it here to review.
0
Comments
-
The command Exitcycle will move the program pointer to the main. It is likely then you will need to start program execution. I can also recommend that you write an ERROR handler. in Checkstatus proc you can RAISE the error to GetVisionData. You could then RAISE it again if you like. Read up on Error handling. You might even want to Long Jump error to a higher level. You will find that one in the rapid kernel manual.Lee Justice0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 799 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings