Removing the fill character, 3ć21 – Rockwell Automation 1771-DA,D17716.5.13 U MNL 1771-DA ASCII I/O MODULE User Manual

Page 63

Advertising
background image

Choosing Module Features

Chapter 3

3Ć21

Compute block length by dividing the number of data characters in the
longest string length by the type of data storage, i.e. 1, 2, 3, or 4
characters per word. For example, a string of 80 data characters having 2
ASCII characters per word, data storage would require a block transfer
block length of 42 words. Don’t forget to add two status words or two
command words.

80/2 + 2 = 40 + 2 = 42

A string of 37 data characters having 3 BCD characters per word of data
storage would require a block length of 15 words. Round remainders to
the next highest whole number.

37/3 + 2 = 12 1/3 + 2 = 13 + 2 = 15

When you have a mix of BCD and ASCII data characters in report
generation mode, allow space for right justification of BCD values within
the data string. Overestimate your read block transfer block length.
Observe how the transferred data is stored, then reduce the block length if
possible.

Some ASCII devices add fill characters such as spaces, nulls, or some
ASCII symbol when sending data to the module. These devices have the
capability to vary the number of data characters, and to add fill characters
so that the sum of data and fill characters is always the same for each
transfer.

The module removes the fill character that you select whenever the
module encounters it in the data received from the device. For example,
suppose the device inserted a dash as the fill character (2D in hex) after
data characters, and varied the number of data characters sent to the
module. Then the device generated the following two transfers:

31 33 32 35 36 39 38 2D 2D 2D 2D

first transfer

37 35 39 31 2D 2D 2D 2D 2D 2D 2D

second transfer

Removing the Fill Character

(Data Mode, Only), IW4(10Ć16)

Advertising