INITWAITERR (Statement) [RC7 Version 2.2 or later]


Initializes the storage of errors detected by WAITERROR. (Exclusive to supervisory tasks)


INITWAITERR


This statement clears errors that have been detected by WAITERROR. It should precede WAITERROR and CURERRSTATUS functions.
If the error storage is not cleared with this statement, the WAITERROR or CURERRSTATUS 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


Top