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

Page 105

Advertising
background image

Chapter 8

Defining Strings for Serial Ports and Viewports

8 – 16

displayed in one of the three conditional colors (green, yellow, or red)
depending on the status of the result.

Draw Line Codes

You can draw lines within a viewport (either

Text

or

Tool

type). You do this

by inserting the draw line code in the string text, which takes this form:

D 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 (left-to-right) from start point to

end point of line drawn

dy

= vertical component of distance (top-to-bottom) from start point to

end point

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.

Note: For

Tool

viewports, the viewport boundaries are that of the screen, so

that the top left corner of the

Tool

viewport would be the screen corner.

For example, the draw line code:

D 10, 20 30, 40

x y dx dy

would draw a diagonal line whose starting point (x,y) coordinates would be
(10, 20) relative to the top left corner of the viewport (the coordinates in the
diagram are listed for illustrative purposes only, and are not part of the
display):

Advertising