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

Page 109

Advertising
background image

Chapter 8

Defining Strings for Serial Ports and Viewports

8 – 20

Plot Line Codes

You can use plot line codes to draw lines within a viewport (either

Text

or

Tool

type), just as you would use draw line codes (refer to the previous

section for information on draw line codes). You use the plot line capability
by inserting the plot line code in the string text, which takes this form:

P x,y (space) dx,dy

where:

x

= x-coordinate (column number) of starting point of line to be drawn

y

= y-coordinate (row number) of starting point

(space) =

space required between fields

dx

= horizontal component of distance from start point to end point of

line drawn

dy

= vertical component of distance from start to end point

Plot line codes work like draw line codes, with two differences. First, recall
that with draw line codes, the

x

and

y

values are relative to the top left

corner of the viewport, the top left corner having (x,y) coordinate values of
(0,0), respectively. With plot line codes, the

x

and

y

values are relative to

the top left corner of the screen image, the top left corner of the image
having (x,y) coordinate values of (0,0), respectively. Also, whereas draw
line code coordinates correspond to a fixed screen resolution of 512 (h) x 256
(v) pixels, plot line code coordinates are relative to the resolution selected for
the camera. Plot line codes are preferable to draw line codes in some cases
(see “Example 7 – Using Plot Line Codes and Formula Indicators” for an
example of using plot line codes).

As with the draw line capability, if the parameters are defined such that they
would cause any portion of the line to be drawn beyond the viewport border,
the line is not drawn.

Change Color Codes

You can change the color in which a string is displayed from the color
assigned using the

Color Selection

menu (see the section “Setting String

Color”) to a color you select with the change color code. You do this by
inserting the change color indicator within the string text, which takes this
form:

Cn

where n is a number from 1-8, which selects the color (see Table 8.B).

Advertising