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

Chapter 8
Defining Strings for Serial Ports and Viewports
8 – 15
(2)
for index fields. That is, the field width is 2 characters; the contents
of the field are right justified.
Conditional Color-coding
You can color-code any tool value based on the pass/warn/fail status of the
respective tool result status. You do this by placing the conditional color
code indicator (the ! symbol) after the particular data code.
With the ! symbol added to a data code, when the string is displayed, the
corresponding tool data is displayed in one of three colors, depending on the
tool result status – Green (if the tool passes), Yellow (if the result is in the
Warning
range), or Red (if the tool fails). The conditional color overrides
the string color assigned using the
Color Selection
menu.
Note: MATH-PAK formulas can be defined which override the ranges of
a particular tool, in which case the respective tool result status is always
“PASS.” If this is the case for the tool result indicated in the conditional
color-coding, the resulting color will always be green, for pass.
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