beautypg.com

7 - error reporting, General, Reporting error codes – Rockwell Automation 1775-KA PLC-3 Communication Adapter Module User Manual User Manual

Page 90: Recovery from errors, Error reporting

background image

Chapter

7

7Ć1

Error Reporting

The 1775–KA module detects and reports various types of errors.
Appendix B lists all the errors reported by the module. As you can see
from the appendix, some of the error codes relate to communications over
the Data Highway, while others relate to programming errors in the
message procedures.

The 1775–KA module reports errors by their code numbers. The module
stores the error code in the interprocedural user symbol ERROR. The
symbol ERROR should be reserved exclusively for error reporting by the
module, so do not use this symbol for any other purpose.

ERROR contains only the last error encountered during execution of a
command or message procedure. If you want to save the error code or
manipulate it in any way, use an assignment command to copy the code
into a more permanent storage word.

Unless you specify differently, the 1775–KA module will stop executing
the current message procedure as soon as the module detects an error. To
specify a different action, use the ON_ERROR command in the message
procedure. Then, when the module encounters an error, it will perform the
action specified in the nearest preceding ON_ERROR command. After
the module is done performing the ON_ERROR action, it will resume
executing the message procedure at the next command line after the one
in which the error occurred.

For example, a message procedure can contain the command

ON_ERROR @ RECOVER

When an error occurs in the procedure, the above command will cause the
1775–KA module to execute the procedure named RECOVER. The
procedure RECOVER might be a routine for monitoring error codes.
After executing RECOVER, the module will resume executing the
original procedure at the next command line following the one in which
the error occurred.

General

Reporting Error Codes

Recovery from Errors