beautypg.com

Plcć2 programming – Rockwell Automation 1771-IFE , D17716.5.90 USER MNL. ANALOG INPUT Module User Manual

Page 26

background image

Module Programming

Chapter 3

3-2

The PLC-2 program example regulates when each block transfer will be
initiated to eliminate problems caused by limited regulation of
bidirectional block transfers. Both storage bits are needed, as shown in the
example, to accomplish this task in all PLC-2 systems, local or remote,
with long or short program scans. Therefore, the program as shown is the
minimum required. Note that PLC-2 processors that do not have the block
transfer instruction must use the GET-GET block transfer format which is
outlined in Appendix E.

Figure 3.1

PLCĆ2 Family Sample Program Structure

Block Transfer Read

EN

[1] You can replace the pushbutton with a timer done" bit to initiate the block transfer

ENABLE

17

DN

DONE

15

Pushbutton [1]

L

Bit A

Done Bit

Pushbutton [1]

U

Block Transfer Write

L

Done Bit

Storage

Block Transfer Write

Bit A

Done Bit

Storage

Bit B

Done Bit

Power-up

U

Block Transfer Read

Bit B

Bit

Power-up

Bit

Storage BTR Done

EN

ENABLE

X7

DN

DONE

X7

Storage

Bit A

Bit

Bit B

Power-up

Bit

Storage

EN

ENABLE

X6

DN

DONE

X6

Storage

Bit B

Bit A

write on a timed basis. You can also use any storage bit in memory.

1

2

3

4

5

6

7

BLOCK XFER READ

DATA ADDR:

MODULE ADDR:

BLOCK LENGTH:

FILE:

XXX

RGS

XX

YYYY - XXX

FILE TO FILE MOVE

COUNTER ADDR:

POSITION:

FILE LENGTH:

FILE A:

XXX

XXX

XXX

YYYY - XXXX

FILE R:

RATE PER SCAN

XXX - XXX

XXX

BLOCK XFER WRITE

DATA ADDR:

MODULE ADDR:

BLOCK LENGTH:

FILE:

XXX

RGS

XX

XXXX - XXXX

Storage

Storage

10954ĆI

Rung 1

Block transfer read buffer: the

fileĆtoĆfile move instruction holds the

block transfer read (BTR) data (file A)

until the processor checks the data

integrity. If the data was successfully

transferred, the processor energizes

the BTR done bit, initiating a data

transfer to the buffer (file R) for use in

the program.
If the data is corrupted during the BTR

operation, the BTR done bit is not

energized and data is not transferred to

the buffer file. In this case, the data in

the BTR file will be overwritten by data

from the next BTR.

Rungs 2 and 3

These rungs provide for a userĆinitiated

block transfer write (BTW) after the

module is initialized at powerĆup.

Pressing the pushbutton locks out BTR

operation and initiates a BTW that

reconfigures the module. Block transfer

writes will continue for as long as the

pushbutton remains closed.

Rungs 4 and 5

These rungs provide a readĆwriteĆread"

sequence to the module at powerĆup.

They also make sure that only one

block transfer (read or write) is enabled

during a particular program scan.

Rungs 6 and 7

These rungs are the conditioning block

transfer rungs. Include all the input

conditioning shown in the example

program.

BTR

BTW

PLCĆ2 Programming