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

Chapter 8
Defining Strings for Serial Ports and Viewports
8 – 34
Data Codes – Using a data code results in the transmission of a field
containing corresponding data. The example includes two data codes,
g1
and
g2
, which cause the transmission of the gage 1 and gage 2 results (109
and 112), respectively.
Gage 2 result
Gage 1 result
Results 109 112 [CR] [LF]
Format Codes – are optionally included in parentheses next to data codes,
and determine, among other things, how many places the transmitted data
will be allowed in the transmitted message. In the example, the format code
(3)
is included with each data code, limiting the transmitted data to 3 places
(if no format code is included, the default format for data is 9 places).
Format Codes – (3)
Results 109 112 [CR] [LF]
Newline Character – consists of an
n
(upper or lower case), and results in
the transmission of the carriage return [CR] and line feed [LF] characters.
The example includes a single newline character at the end of the string.
Newline Character
Results 109 112 [CR] [LF]
Finally, recall that, for this example, the string is to be transmitted only when
the inspection fails. In order to accomplish this, we must specify the event
using the
Event
menu.
The following diagram shows that
Master Range
and
Print on Fail
have
been selected on the
Event
menu; with the event thus specified, the string is