In C languages, you can prevent your program from crashing by using a try-catch block:
Code
try {
// code that might throw errors
}catch(Exception e) {
// code to handle errors
}
Display More
Is there a KRL equivilent?
I know you can do
Code
ON_ERROR_PROCEED
; line that can cause an error
IF $ERR.NUMBER <> 0 THEN
; err handling
ERR_CLEAR($ERR)
ENDIF
However, while that works for some errors, it does not work for motion commands. I tried this:
in an attempt to catch issues where points are taught that are impossible to move linearly to due to the previous point, but the software limit switches seem to override the ON_ERROR_PROCEED keyword and throw an error anyway. What would be the best way to overcome this?
Thanks!