beautypg.com

Demonstrating end of string – Rockwell Automation 1771-DA,D17716.5.13 U MNL 1771-DA ASCII I/O MODULE User Manual

Page 83

background image

ASCII I/O Module Tutorial

Chapter 4

4Ć9

Table 3.D

String Length, Right Justified

POSITION

FILE DATA

ASCII Equivalent

001

002

003

004

005

006

007

008

2020

2020

2020

2020

2042

5241

444C

4559

B

R A

D L

E Y

2.

Display the data on your industrial terminal using the procedure in
entitled “Writing Data to Your ASCII Device”, P.1-14.

Set your industrial terminal to alphanumeric mode. Switch the processor
mode select switch to the RUN/PROG position.

Results Your industrial terminal displays the following:

BRADLEY

BRADLEY is displayed in a position eight spaces from the left margin.
This example is equivalent to transferring seven right justified data
characters when the set string length is 15 characters and the data
conversion is 2 ASCII characters per word.

In this demonstration you will select an end-of-string delimiter and
demonstrate its use.

Select the carriage return (CR) as the end-of-string delimiter and set
IW3(10-16) accordingly. The ASCII code for carriage return is 0D in
hex, 0001101 in binary.

1.

Set IW3(10-16) for the end-of-string delimiter, CR, and reset the
margin justification bit IW3(03) to zero for right justification using
the procedure in section titled “Setting Bits in Initialization Words”,
P. 3-4.

Demonstrating EndĆofĆString

Delimiter