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

Page 132

Advertising
background image

Chapter 8

Defining Strings for Serial Ports and Viewports

8 – 43

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.

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

Advertising