WAITERROR
(Statement)
[RC7 Version 2.2 or later]
Detects errors. (Exclusive to supervisory tasks)
WAITERROR
This function waits for an error to occur in the robot controller and returns its error code.
It detects up to recent 32 errors in the order of occurrences.
If not preceded by the INITWAITERR statement to clear the error storage, this function may not detect errors normally.
PROGRAM TSR1
|
|
-----------
|
|
INITWAITERR
|
'Initialize WAITERROR data.
|
-----------
|
|
·
|
|
·
|
|
·
|
|
WHILE 1
|
'Start of loop
|
-----------
|
|
I1 = WAITERROR
|
'Detect an occurrence of error.
|
I2 = CURERRSTATUS
|
'Get current error status.
|
-----------
|
|
WEND
|
'End of loop
|
-----------
|
|
END
|
|