- Import from Live
- horstFX - Roboter-Bediensoftware
- Grafisches Programmieren
Command: Try-Catch statement
This command is relevant for executed movements that are specified by external devices, e.g. camera or PLC.
If an error occurs, e.g. if a position specified by the camera cannot be reached, this error can be intercepted in the robot programme. All commands within the try-catch instruction are checked and only executed if they are possible.
Try
commands within the try block are executed completely or until an error occurs. If an error occurs, the catch block is activated.
Catch
In the Catch block, the commands are only executed if an error occurs within the try.
Finally
The commands in the Finally block are always executed regardless of the events in the Try and/or Catch block. This can be important in order to end certain functions cleanly.