beautypg.com

Rockwell Automation 1775-S4B,D17756.5.3 User Manual SCANNER/MSG HND User Manual

Page 119

background image

Using Commands in Report Generation

Chapter 10

10Ć16

The 1775-S4B scanner does not execute an on_error command line in
sequence with the other command lines in the procedure. If the 1775-S4B
scanner detects a runtime error on a command line in the procedure, its
response to that error is determined by the last on_error command line. By
entering an action command statement following the on_error, you can
instruct the 1775-S4B scanner to display specific information if it detects a
runtime error.

If the last preceding on_error command line contains an action command
statement, the 1775-S4B scanner executes the action command statement
when it detects a runtime error.

If you do not insert any on_error command lines in your procedure, the
1775-S4B scanner displays the erroneous line along with the error code
and procedure execution stops. The 1775-S4B scanner assigns the error
code message to the interprocedural user symbol ERROR. You can display
the latest error code by executing a print command with ERROR as the
data specifier.

If you enter the on_error command on a command line without an action
command statement, the 1775-S4B scanner does not display the erroneous
line or error code, and procedure execution continues.

If a syntax error occurs in any of the command lines below an on_error
command line, the 1775-S4B scanner does not display an error code.
Therefore, we suggest that you insert on_error command lines into your
procedure after you correct all syntax errors.

Example using the on_error command:

If you enter:





O G DIV_ERR
A=(B%C)



O @NO_PROC
CA (A - B) @S @T @U @V