Communications messages – Rockwell Automation 5370-OCR2 PAK User Manual

Page 74

Advertising
background image

Chapter 8

Communications and Results Processing

8–3

Communications messages are used to transmit inspection results via the
serial ports or Remote I/O port. Refer to the CVIM2 Communications
Reference Manual for a complete description of the Communication
Message Editor.

Any of the OCR Tool results shown in the preceding table can be used in a
communications message.

Note:
Each result field of a communication message contains Field (field width)
and Prec (precision) settings which determine how the result is formatted.
For numeric values, the precision specifies the number of digits past the
decimal point, and defaults to zero. When a String result is to be included in
a message, the precision must be set to the maximum number of characters
expected in the string. The field setting should be equal to or greater than the
precision.

Set Prec to the same value as
Field for OCR Strings.

The Math tool can access any of the results of the OCR Tool. The numerical
Fail codes are simply accessed as numbers. When a Math tool accesses a
String result, the string is first converted to a number.

When a String result is converted to a number, only the left–most sequence
of digits (and an optional minus and decimal point) is converted. Any other
characters are ignored. For example:

This string result:

Is converted to this value:

–123.78

–123.78

123ABC

123

–57.5x21.4

–57.5

Part 575

0

Communications Messages

Accessing OCR Results from
Math Tools

Advertising