Special characters: n – Rockwell Automation 5370-UPK CVIM USER-PAK Option User Manual
Page 83

Chapter 8
Defining Strings for Serial Ports and Viewports
8–7
Special Characters: N, /, %, #
These four characters have special functionality within the string text:
N
– the newline character
/
– the character code indicator
% – the formula indicator
#
– the index character
The N (newline) character
Serial Ports: Place the letter
N
(upper or lower case) in the string to
transmit both the ASCII carriage return [CR] and line feed [LF] characters.
This can be especially useful if the string is intended for printing.
Example: Assume – gage 1 result = 125, gage 2 result = 450
This string
transmits this:
G1 G2
_ _ _ _ _ _ 125 _ _ _ _ _ _ 450 (where “_” is a space).
G1 n G2
n
_ _ _ _ _ _ 125 [
CR
] [
LF
]
_ _ _ _ _ _ 450 [
CR
] [
LF
]
Viewports – Lower Case n: Place the letter
n
(lower case) in the string to
cause the remainder of the string to be displayed on a “new line” beneath the
first part of the string. This case be useful in displaying columns of items.
Example: Assume – gage 1 result = 125, gage 2 result = 450
This code
displays this:
G1 G2
_ _ _ _ _ _ 125 _ _ _ _ _ _ 450 (where “_” is a space).
G1 n G2
_ _ _ _ _ _ 125
_ _ _ _ _ _ 450
Viewports – Upper Case N: The letter
N
(upper case) has the same effect
as the lower case letter
n
, with this addition:
If a string with the
N
(upper case) character at the end is used with the
Repeat String
feature to display a column of items for an inspection, and
for one iteration of the repeated display, the string content is not displayed
(because the defined
Event
for that string did not occur), the
N
causes a
blank line to be inserted where the string would have appeared had it been
displayed. When the lower case
n
is used under these conditions, no
blank lines are displayed.