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

Page 135

Advertising
background image

Chapter 8

Defining Strings for Serial Ports and Viewports

8 – 46

Example 7 – Using Formulas and Plot Line Codes

Recall that it is possible to draw or plot lines, and/or position strings through
the use of draw line or plot line codes, and that it is possible to use the results
of formulas as draw/plot line parameters. The

Tool

viewport string in our

example display provides a case in which tool results are used to plot lines
and position strings within the display.

Figure 8.20 Example of custom runtime displays (viewports)

Tool Viewport String

This

Tool

viewport locates and points out the corner of the part shown in the

monitor image; it also displays the (x, y) coordinates of the corner.

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

Advertising