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

Chapter 8
Defining Strings for Serial Ports and Viewports
8–29
The second
#
is used with the data code –
g#
; used this way, the index
causes the transmission of the gage results for gages 1–5, respectively, as the
index increments from 1–5:
Index character
Transmitted String:
Gage 1 = 205 [CR] [LF]
Gage 2 = 30 [CR] [LF]
. . . etc.
Note that the newline character (n) placed at the end of the string causes a
carriage return and line feed to be transmitted at the end of each line:
Newline Character
Transmitted String:
Gage 1 = 205 [CR] [LF]
Gage 2 = 30 [CR] [LF]
. . . etc.
Viewports: The “Text and Tool Viewport String Examples” section in this
chapter provides an example of using the repeat string feature, and the (N)
newline and (#) index characters. Refer to “Example 4 – Using the Repeat
String and # (Index) Character.”
Using Math Formula Results for Repeat String parameters
If you have installed the MATH–PAK (Allen–Bradley Cat. No. 5370–MPK)
option package, you can assign the results of formulas to the
Start
,
Increment
, and/or
End
values. Do this by entering a negative value, which
corresponds to the formula, for the respective repeat string parameter.
For example, to assign the results of formula 5 to the
Start
value, you would
set the
Start
value to –5. Then, for a particular inspection, if the formula 5
result is 7, for example, the
Start
value for that inspection is 7.
Here are additional considerations when using formula results for the
Repeat String
parameters:
Decimal Portions Ignored: Only the whole number portions of formula
results are used; any fractional portions are ignored.
Positive Increment Values: If a negative or zero (0) value is inserted for the
Increment
during runtime processing, the value of 1 is used.
Repeat Limit: A string can be repeated no more than 128 times, no matter
what values are inserted by the formulas.