Rockwell Automation 5370-UPK CVIM USER-PAK Option User Manual

Page 119

Advertising
background image

Chapter 8

Defining Strings for Serial Ports and Viewports

8–43

Here are the different elements of the string text:

The string text begins with a plot line code, which follows the format

Px,y dx,dy.

x y

dx dy

In this example, the x value (the x–coordinate of the starting point of the
line) is %1, indicating the x–coordinate is taken from formula 1. The
formula 1 result is defined, in this case, as the x–coordinate of the edge of the
part, as detected by the reference line 1. The y value (the y–coordinate of the
starting 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