beautypg.com

Example 3 – using the draw line code – Rockwell Automation 5370-UPK CVIM USER-PAK Option User Manual

Page 112

background image

Chapter 8

Defining Strings for Serial Ports and Viewports

8–36

Example 3 – Using the Draw Line Code

A draw line code was used to draw the horizontal line separating the display
title (“Acme . . .”) from the rest of the viewport.

Example 3

Shown below is the string text used to create the horizontal line. Recall that
the draw line code follows the format Dx,y dx,dy.

x y

dx dy

In this case, the x value (the x–coordinate of the starting point of the line) is
0, indicating the left edge of the viewport. The y value is not a specific
value; rather, it is the

*

symbol (which means “cursor position”); this

conveniently allows you, in this case, to vertically position the line’s starting
point using the string

Pick & Place

function (on the

Define String

menu).

The dx value (the horizontal component of the length of the line drawn) is
479, which is the width of the viewport.

Note: You can find out the dimensions of a viewport by enabling the help
message while using

Pick & Place

to position the viewport). The dy value

(the vertical component of the length of the line drawn) is 0, which indicates
a horizontal line.