ID : 5815
Error handling in PacScript
Error types where PacScript handles
There are two types of errors where PacScript handles as errors; controller errors and task errors.
Controller error
System software of the controller consists of a main module and several other software modules, such as for the robot control, task program execution control, I/O control, variable management.
A controller error refers to an error that is informed to the main module from each software module.
Task error
A task error is an error issued within a task.
- Task errors are controlled by Err objects, and it can be referred by tasks when an error occurs.
- A task error will be cleared once the task recovers from the error state.
Task errors handled as controller errors
Any task errors under the following conditions are handled as controller errors.
- A task error with error level 2 or more.
-
A task error which handling is not defined.
A task error that occurs when On Error statement is not defined
Operation command for each error
Operation | Command | |
---|---|---|
Controller error | Task error | |
Refer to an error number | CurErr |
Err.Number (Err.OriginalNumber) |
Refer to an error level | ErrLvl | Err.Level |
Refer to an error description | ErrMsg | Err.Description |
Clear an error | ClrErr |
Execute Resume command during error state or, Execute End Sub (or End Function) to end the task. |
Generate an error | None | Err.Raise |
ID : 5815