Rockwell Automation 5370-UPK CVIM USER-PAK Option User Manual
Page 93
Chapter 8
Defining Strings for Serial Ports and Viewports
8–17
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).
Using the
*
Symbol
The
*
symbol can be used as a parameter for either or both of the starting
point coordinates (the
x
and
y
values). The
*
symbol causes the respective
x
or
y
value to be determined by the current cursor position.
For example, this code:
D*,* 50,0
causes a horizontal line to be drawn, 50 pixels in length, with the starting
point determined by the current cursor position. Since the initial cursor
position is as set by the string
Pick & Place
function, you would set the
line’s starting point, in this case, using
Pick & Place
:
Line drawn
Viewport border
Starting point
determined by
Pick & Place
Using an Offset: You can include an offset with the
*
symbol by placing a
“+” or “–” sign after the
*
, followed by the desired offset value. For
example, the code
D*–92,*+10 90,0
would draw a line starting at 92
pixels to the left of the cursor position (x =
*
–92), and 10 pixels down
(y=
*
+10). The line would be 90 pixels in length, and horizontal (dx = 90, dy
= 0).
This particular draw line code,
D*–92,*+10 90,0
, could be used to
underline previous text in the string, as shown in the example below:
This code:
”PART REJECTED” D*–92,*+10 90,0
Displays this string:
PART REJECTED
Cursor position after displaying
PART REJECTED
Line starting point is 92 pixels left, 10 pixels
down, relative to cursor position
There is often more than one way to achieve a given effect. For example,
this code could also have been used to generate the string display shown
above:
”PART REJECTED” D *–2,*+10 –90,0