beautypg.com

Rockwell Automation 5370-UPK CVIM USER-PAK Option User Manual

Page 115

background image

Chapter 8

Defining Strings for Serial Ports and Viewports

8–39

Example 5 – Using Data Codes and # (Index) Character

The second and third columns in the viewport display (the mean and
standard deviation values, respectively, for gages 1–5) were created using a
single viewport string, along with the

Repeat String

feature.

Example 5

Here is the string text used to create the displayed strings:

Here are the elements of the string text used:

Data codes are used to display the mean (data code

Sn.3

, where n is the

tool type and tool number indicator – see Table 8.A Data Codes in this
chapter) and the standard deviation (data code

Sn.4

) in the string. In

both cases, we use the # character in place of the n; thus when the string is
repeatedly displayed, the current index number is inserted, designating the
specific tool type and number.

Format codes are added to each data code. The format code

(7.3)

is

added to the data code

S#.3

(the mean), setting the width of the

displayed data field to seven places, and limiting the decimal portion of
the field to three places. The format code

(7.4)

is added to the data

code

S#.4

(the standard deviation), setting the field width to seven

places, and limiting the decimal portion of the field to four places.