Rockwell Automation 5370-UPK CVIM USER-PAK Option User Manual
Page 113
Chapter 8
Defining Strings for Serial Ports and Viewports
8–37
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.
Example 4
Here are the elements of the data code 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.
Using the
Repeat String
and # (Index) Character
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.