Rockwell Automation 1772-LV Mini-PLC - 2/15 Programmable Controller (Series B) Programming and Operations User Manual

Page 99

Advertising
background image

Advanced Instruction Set

Chapter 6

6Ć42

respective user’s manual for the block transfer module to determine the correct
usage of the diagnostic and/or data valid bit(s).

One technique of buffering data is to store the transferred data in a temporary
buffer file. If the data in the buffer is valid, it is immediately transferred to
another file in the data table where it can be used. If invalid, it is not transferred
but written over in the next transfer. Another technique uses only one file. The
technique prevents invalid data from being operated upon by preconditioning
the rungs that would transfer data out of a file one word at a time. Diagnostic
and/or data-valid bits are examined in these rungs.

Data can be moved from storage word-by-word using get/put transfers. Or, the
entire buffer file can be moved at once using a file-to-file move instruction.
The choice depends on the kinds of diagnostic and/or data-valid bits and the
objectives of the user program. Generally, when one diagnostic bit is contained
in each word, a get/put transfer is used. When one is set for the entire file, a
file-to-file move instruction is used. In either case, the diagnostic bits are
examined as conditions for enabling the file move or word transfer.

The example in Figure 6.16 shows the memory map and ladder diagram rungs
for buffering 3 words of data that are read from the block transfer module. The
data is read and buffered in the following sequence:

1. When rung 3 goes true, bit 01407 (the block transfer enable bit) will be

turned on and block transfer will be requested. This latches on storage bit
01000 in rung 4.

2. Block transfer will be enabled during the program scan. The transfer will

be performed during an interruption of the next I/O scan. Data from the
module will be loaded into words 050-052. when block transfer is
complete, bit 114/07 (the block transfer done bit) is set in the input image
table. This indicates block transfer was successfully performed. The
processor then continues with the I/O scan and program scan.

3. During the program scan, rung 1 will be true because bit 01000 is still

latched on and bit 11407 is on because block transfer was performed. This
will turn bit 01002 on. in rung 2, bit 01000 is then unlatched.

4. In rung 5, bit 01002 is still on and a diagnostic bit is examined to ensure

the data read from the module is valid. Assuming the data is valid, the
diagnostic bit will be on and the data will be transferred from word 050 to
150. In rungs 6 and 7, the data in words 051 and 052 will be transferred to
words 151 and 152, respectively, if the diagnostic bits are on.

Advertising