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

Chapter 8
Defining Strings for Serial Ports and Viewports
8 – 13
Examples: Assume window 1 result = 1234:
This code
transmits (or displays) this field:
W1
_ _ _ _ _1234 (default format is 9 places, right justified)
W1(5)
_ 1234
W1(3)
123 (result is truncated)
W1(0)
(no field transmitted or displayed)
Examples: Assume formula 1 result = 123.45:
*
This code
transmits (or displays) this field:
F1(5)
123.4 (result is truncated)
*
F1(6)
123.45
F1
_ _123.450 (default format is 9 places, three decimal)
*
Note: Decimal points (“
.”), if present in the result, use one of the
allotted places in the field. If a decimal point is present, make sure you
allow for its use of one place.
(–x)
The “minus” sign (
–
) placed within the format code specifies the
value will be left justified within the transmitted field. Any unused places are
left as spaces following the value in the transmitted field.
Examples: Assume window 1 result = 123
This code
transmits (or displays) this field:
W1(4)
_ 123
W1
_ _ _ _ _ _ 123
W1(–4)
123 _
W1(–)
123 _ _ _ _ _ _
(0x)
The zero
(0)
placed at the left of the field width specifies that any
unused places in the transmitted field are filled with zeros. The “minus” sign
(– )
can be included to specify the value will be left justified.
Examples: Assume window 1 result = 1234
This code
transmits (or displays) this field:
W1(08)
00001234