
Chapter 8
Defining Strings for Serial Ports and Viewports
8–14
For example, suppose the following string text is entered, and is assigned the
color Blue using the Color Selection menu:
“Gage 1:” g1(4)! (where g1 is the data code for the result of gage 1).
When the string is displayed, the literal text Gage 1: would be displayed in
blue. The result of gage 1 would then be displayed, not in blue, but in one of
the three conditional colors (green, yellow, or red) depending on the status of
the result, as shown below:
Tool result is displayed in green,
yellow, or red.
Gage 1: 115
Literal Text is displayed in blue.
Extended Conditional Color–Coding
You can extend the conditional color–coding effect in order to color–code the
part of the string which follows the color–code indicator in the string text.
You do this simply by placing a double ! symbol (!!) after the data code.
One use of this capability would be to color–code literal text. For example,
suppose the following string text is entered:
G1(0)!! “Gage 1” (where g1 is the data code for the result of gage 1).
In this case, when the string is displayed, the gage result itself is not
displayed, since the format code (0) sets the field width for the data to 0
places. However, the remainder of the string (the literal text Gage 1) is
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.
Comentarios a estos manuales