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

Page 107

Advertising
background image

Chapter 8

Defining Strings for Serial Ports and Viewports

8 – 18

Cursor Positioning with Draw Line Codes

Any string content that follows the draw line parameters in the string will be
displayed beginning at the end point of the line previously drawn. This is
because draw line parameters set the current “cursor position” for the string.

The cursor position is the point at which the next field in the string will be
displayed, or the next line in the string will be drawn. When the string is
displayed, the initial cursor position is as set by the string

Pick & Place

function. The cursor position subsequently changes, as the string is
displayed. The final cursor position is at the end point of the last line drawn,
or if other contents follow, at the end of the last field in the string.

For example, the string text:

D10,20 30,40 “End Point”

would draw a diagonal line followed by the literal text

End Point

:

End Point

Cursor position after displaying

End Point

Cursor position after

drawing

line

The

dx

and

dy

parameters can be omitted when using the draw line code. If

they are omitted, no line is drawn; however, the cursor position is set by the
starting point (x,y) coordinates. Any remaining part of the string is displayed
beginning at the starting coordinates. In this way, you can use the

x

and

y

starting coordinates to position string contents.

For example, the string text:

D10,20 “Results”

would not draw a line, but would display the word

Results

, beginning at

starting point (10, 20):

(10, 20)

(No line drawn)

Viewport border

Starting point

Results

Draw Line Code Position Priority: The draw line coordinates have priority
over the string

Pick & Place

function. The position of any lines drawn, and

the position of any subsequent part of the string positioned by the draw line
parameters, are not affected by string

Pick & Place

function, unless the

*

symbol is used (see below).

Advertising