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

Page 116

Advertising
background image

Chapter 8

Defining Strings for Serial Ports and Viewports

8–40

Literal text (in this case, spaces enclosed in quotes) is used to provide
spacing between the two data fields.

The N (newline) character causes subsequent string text to be displayed
directly below the previous text. In this case, used with the

Repeat

String

feature (discussed below), the N character is used to display the

repeated string in a column, rather than across the viewport from left to
right, which is not desirable in this case.

Using the

Repeat String

and # (Index) Character with Statistics Codes

Recall that the

Repeat String

feature allows you to repeatedly display a

string. This is accomplished through the use of an “index” number, which is
incremented through a range of values – you define this range using the

Repeat String

menu.

You can use the

#

(index) character in the string; when the

#

is placed in the

string text as part of a data code, the

#

is replaced in the data code with the

current index value.

Remember that we are using the data codes

S#.3

for the mean (where # is

the tool type and tool number indicator) and

S#.4

for the standard deviation

in the string. In both cases, when the string is repeatedly displayed, the
current index number is inserted, designating the specific tool type and
number for the mean and standard deviation.

Keep in mind that we are displaying the mean and standard deviation for
gages 1–5. According to the data code table (see “Data Codes” this chapter),
the code

S9.3

will display the mean for gage 1, the code

S10.3

will

display the mean for gage 2, etc. Likewise, the code

S9.4

will display the

standard deviation for gage 1, the code

S10.4

will display the standard

deviation for gage 2, etc. Thus, to have the correct values inserted in the
respective data codes, we need to set the

Repeat String

parameters as

follows:

Start:

9

End:

13

Increment:

1

Thus, in this example, we display the string 5 times, and include the numbers
9–13 in the five strings, respectively, where they are used to invoke the
corresponding mean and standard deviation values for gages 1–5.

Advertising