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

Page 157

Advertising
background image

Special Programming Techniques

Chapter 11

11Ć10

Data Address and Module Address - The module address is stored in BCD in
the data address of the read and write instructions. In this example, the module
address is 130: rack 1, module group 3, slot 0.

Two data addresses must be used. In this example they are 040 and 041. Both
contain the module address. For bidirectional operation, each data address word
also contains an enable bit; bit 16 for a read operation (in 040). When the
processor searches the data addresses in the timer/counter accumulated area of
the data table, it finds two consecutive data addresses both containing the same
module address. The read bit is set high in one data address (in 040). the write
bit is set high in the other (in 041). When the processor finds a match of the
module address and the enable bit (read bit or write bit) for the desired direction
of transfer, it then locates the file address to which (or from which) the data will
be transferred.

File Address - Generally two file addresses are required: one to receive data
transferred from the module, the other containing data to be transferred to the
module. In this example, they are 060 and 070. the consecutive storage
locations containing the file addresses in BCD are found in the preset area of the
data table at addresses 140 and 141. They are found 1008 above the
corresponding consecutive data addresses in the accumulated area of the data
table.

Block Length - The block lengths of the read and write instructions can be set
equal or unequal to each other up to any value not exceeding the default
(maximum) block length of the module. If the default value is used, it instructs
the module to control the number of words transferred. Although the default
value varies from one kind of module to another, it can be entered into the
instruction block as the number 00 for all block transfer modules.

Equal Block Lengths - When the block lengths are set equal or when the
default block length is specified by the programmer, the following
considerations are applicable. (Our example shows equal block lengths):

Both the read and write instructions could and should be enabled in the same

scan (separate but equal input conditions).

The module decides which operation will be performed first when both

instructions are enabled in the same scan.

The alternate operation will be performed in a subsequent scan.

Transferred data should not be operated upon until the done bit is set.

Advertising