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

Page 129

Advertising
background image

Chapter 8

Defining Strings for Serial Ports and Viewports

8 – 40

Example 4 – Using Repeat String and # (Index) Character

The first column in the viewport display (Gage 1:, Gage 2:, etc.) was created
using a single viewport string, along with the

Repeat String

feature.

Figure 8.15 Example of using repeated strings in custom runtime displays

Example 4

Here are the elements of the text used to create the string:

Literal text (enclosed in quotes) is used to display the word Gage and the
:” (colon).

The # (index) character, when used as a standalone character (that is, not
as part of a data code), displays the current value of the index. In this
case, used with the

Repeat String

feature (discussed below) the #

character is used to supply the gage numbers 1-5 for the repeated Gage
string.

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 placed at the end of

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

Advertising