Rockwell Automation 1771-IS 5V DC INPUT MOD User Manual

Page 35

Advertising
background image

Programming and Operation

Chapter 3

3-16

Programming Example, PLC-2 Family

Two methods of programming are described: one using block transfer
instructions, the other using multiple GET instructions. Refer to
Figure 3.8. The data table mapping is the same for both.

For this example, 3 words of data are used to transfer the settings of two
4-digit thumbwheel switches. The settings are 9751 and 8642 for
thumbwheel switch assembly 1 and 2, respectively. (The first word is
reserved for diagnostic data.) The module is located in the upper slot of
rack 1 module group 2. The module address is 121

8

. If located in the

lower slot, the module address would be 120

8

and output bits 10, 11, 12,

16 and 17 used in the example would become 00, 01, 02, 06 and 07,
respectively.

Block Transfer Instructions

Rung 1 - When this rung is enabled, the switch status data in module
memory is transferred to the data table. The 3 words specified by the
block length will contain diagnostic data and the data of thumbwheel
switch assemblies 1 and 2.

The block length is set to 1 plus the number of thumbwheel switch
assemblies, or 1 plus the number of pairs of switch banks required by the
application.

Multiple Get Instructions

Read the description for BLOCK TRANSFER INSTRUCTIONS first.

Rung 1 - This rung is used to identify the module (module address 121

8

in the first GET instruction) and the first address of the destination of the
transferred data (word address 060

8

in the second GET instruction). The

rung also sets the block transfer read bit (bit 17) in the module’s output
image table byte.

Rungs 2, 3 - These rungs set the number of words to be transferred by
setting a binary bit pattern in the module’s output image table byte. Bits
10 and 11 are set ON. the binary bit pattern 11 is equivalent to the
number 3.

Advertising