I'm looking to include in my code a part that would handle errors and stop commands.
Voltt
✭
in RobotStudio
I am not sure how to program it. Basically, I have one Digital output that switches on, during the course of my code. I want this Digital output to turn Off every time a specify error occurs or a group of errors occur. Also, I want the Digital Output to turn OFF, when i stop the program. How do I go about adding this feature into my code?
0
Answers
-
To manage errors you can use the RAISE instruction, create a custom errornum and then raise it, the code will jump to the ERROR section of the procedure, then you can check what error has been raised and turn off that signal.
If you want to turn OFF a signal when your program is stopped you can link that signal to the motoron signal on a crossconnection or you can create an "onStop" event on the controller configuration that will call a procedure every time the program is stopped, then on that procedure you can turn off that signal.0 -
I don't know why I didn't think of it before, but the system output Cycle On should do exactly what you were asking.Lee Justice0
-
I'd use the Stop event routine to turn off the signal at each stop (or tie it to a system output like suggested above).
And a IError trap that turns the output off if the error number matches a list of custom error numbers.
0
Categories
- All Categories
- 5.5K RobotStudio
- 395 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