7 - diagnostics methods, Diagnostics methods – Rockwell Automation 1775-S5_SR5,D17756.5.5 User Manual PLC-3 FAMILY I/0 User Manual

Page 113

Advertising
background image

Chapter

7

7-1

Diagnostics Methods

This chapter describes how the scanner detects and reports various types of
errors. Appendix B lists all the errors reported by the scanner.

Error Reporting

When an error occurs, the scanner automatically creates and stores the
error code in the interprocedural user symbol ERROR. You should reserve
the symbol ERROR exclusively for error reporting.

ERROR contains only the last error encountered during execution of a
command or message procedure. The scanner clears the ERROR symbol
whenever a procedure is finished, even a called procedure. If you want to
save the error code or manipulate it in any way, you can use an assignment
command to copy the code into a more permanent storage word.

Recovery from Errors

Unless you specify differently, the scanner stops 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 scanner encounters an error, it performs the action
specified in the nearest preceding ON_ERROR command. After the
module completes executing the ON_ERROR action, it resumes executing
the message procedure at the command line following 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 ON_ERROR command causes
the scanner to execute the procedure named RECOVER. The procedure
RECOVER might be a routine for monitoring error codes. After executing
RECOVER, the scanner resumes executing the original procedure at the
command line following the one where the error occurred.

Chapter Objectives

DH/DH+ Message Procedure

Diagnostics

Advertising