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

Chapter 8
Defining Strings for Serial Ports and Viewports
8 – 38
Example 2 – Using the Change Color Code
The
Graph
viewport, which plots the results of window 1 and 2, is headed
by the actual result values for the two windows. These two window results
were created by a single viewport string, and each result is colored to match
the respective window result being plotted. Generating the change in color
within the string required the used of a color code within the string text.
Figure 8.13 Example of changing colors in runtime displays
Example 2
In the string text shown below, the code
c5
assigns a color (blue) to the part
of the string to the right of the code. Thus the first part of the string (the
window 1 results) is displayed in the color assigned through the
Color
Selection
menu, and the second part (window 2 results) is displayed in blue.
Note that both of the data codes in the string,
W1
and
W2
, include the format
code (–), which causes the window results to be left-justified within the
display field – this means, in this case, that the results are displayed
immediately after the “=” sign, with no intervening spaces.