18ć16 – Rockwell Automation 1772-L8_LW_LWP_LX_LXP,D17726.5.8 User Manual User Manual

Page 281

Advertising
background image

Block Transfer

Chapter 18

18-16

Under certain conditions, you might want to transfer part of a file rather
than the entire file. For example, a processor could be programmed to read
the first two or three channels of an analog input module periodically but
read all channels less frequently. To do this, use 2 or more Block Transfer
Read instructions: one for each desired transfer length. The read
instructions would have the same module address, data address, and file
address but different block lengths. The size of the file would equal the
largest transfer.

When two or more block transfer instructions have a common module
address, program carefully to compensate for the following
possible situations:

First - During any program scan, data in the output image table byte can
be changed by each successive block transfer instruction having a common
module address. The enable bit can be turned on or off according to the
true or false condition of the rungs containing these instructions. The on or
off status of the last rung governs whether the transfer occurs.

Second - The block length can be changed according to the block lengths
of the enabled instructions. The block length of the last enabled block
transfer instruction having a common module address governs the number
of words transferred.

ATTENTION: When programming multiple writes (or reads)
to the same module, it is possible that a desired transfer will not
take place or the number of words transferred will not be the
number programmed. Invalid data could be sent to a device (or
could be operated upon in subsequent scans) resulting in
unpredictable and/or hazardous machine operation.

The example in Figure 18.7 shows how multiple reads of different block
lengths from one module can be programmed. When any one of the input
switches is closed, the rung is enabled and the block length of the Block
Transfer instruction is the same as the block length in that rung. The last
rung sets (or energizes) the read bit of the block transfer instruction
regardless of the previous changes in the status of the enable bit. The
Examine Off instructions prevent more than one of the block transfer
instructions from being energized in the same scan.

Important: The same discussion applies when programming multiple
writes of different block lengths to one module.

Multiple Reads of Different

Block Lengths

Advertising