Plc-2 programming – Rockwell Automation 1771-IL/B , D17716.5.91 ISOLATED ANALOG INPUT Module User Manual
Page 21
Communicating With Your Module
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 D.
Figure 3.1
PLC-2 Family Sample Program Structure
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
Pushbutton [1]
U
Storage
L
Storage
Bit A
Storage
Bit B
U
Storage
Bit B
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
XXXX – XXXX
FILE TO FILE MOVE
COUNTER ADDR:
POSITION:
FILE LENGTH:
FILE A:
XXX
XXX
XXX
XXXX – XXXX
FILE R:
RATE PER SCAN
XXXX – XXXX
XXX
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 insure 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
Block Transfer Read
Done Bit
Block Transfer Read
Done Bit
Block Transfer Write
Done Bit
Block Transfer Write
Done Bit
BLOCK XFER WRITE
DATA ADDR:
MODULE ADDR:
BLOCK LENGTH:
FILE:
XXX
RGS
XX
XXXX – XXXX
Power-up
Bit
Program Action
PLC-2 Programming