Rockwell Automation 5370-CUPK Color CVIM USER-PAK Option User Manual

Page 136

Advertising
background image

Chapter 8

Defining Strings for Serial Ports and Viewports

8 – 47

point of the line) is %2, indicating the y-coordinate is taken from formula 2.
The formula 2 result is defined, in this case, as the y-coordinate of the edge
detected by the reference line. Thus the line’s starting point, based on the
two formula results, is located at the corner of the part. As the part position
changes from inspection to inspection, the starting point of the line moves
accordingly.

The dx and dy values are each 10, which plots a short line from the starting
point to an end point which is 10 pixels to the right, and 10 pixels down.

Data codes (

F1

and

F2

) are used to display the results of formula 1 and

formula 2.

The format code (3) or (–3) is added on to each data code to limit the
display field to three places for the result, and to left justify the second
result.

The

! symbol, the conditional color-code indicator, is also added to each

data code. This has the effect of displaying the results in a conditional
color (green, yellow, or red), depending on the status of each formula
(pass, warning, or fail, respectively).

Advertising