Block transfer examples for earlier processors, Btr and btw control logic examples, Appendix d – Rockwell Automation 1747-SN Remote I/O Scanner User Manual
Page 129
1
Publication 1747-UM013B-EN-P - January 2005
Appendix
D
Block Transfer Examples for Earlier
Processors
BTR and BTW Control Logic
Examples
These BTR and BTW instructions are for SLC 5/03, SLC 5/04 and SLC
5/05 or earlier processors with OS302, OS401, OS501 series B or
earlier operating systems.
Block Transfer Read Control Logic Example
Rung 2:0
CONFIGURE THE BTR OPERATION TYPE, LENGTH AND RIO ADDRESS AT POWER-UP. BIT
B3:100/7 MUST BE SET PRIOR TO GOING TO RUN TO INDICATE A BTR OPERATION.
| |
| |
| |
| POWER-UP BTR |
| BIT CONTROL |
| S:1 +COP---------------+ |
|----] [--------------------------------------------------+COPY FILE +-|
| 15 |Source #B3:100| |
| |Dest #M0:1.100| |
| |Length 3| |
| +------------------+ |
Rung 2:1
COPY THE BTR STATUS AREA TO A BINARY FILE WHICH WILL BE USED THROUGHOUT THE
PROGRAM. THIS AVOIDS ADDRESSING THE M1 FILE MULTIPLE TIMES DURING EACH PROGRAM
SCAN. EACH TIME AN INSTRUCTION CONTAINING AN M1 FILE BIT, WORD OR FILE IS
SCANNED BY THE PROCESSOR, AN IMMEDIATE DATA TRANSFER TO THE MODULE OCCURS AND
THEREFORE WILL IMPACT THE OVERALL PROCESSOR SCAN TIME.
| SERVICE |
| THE BTR |
| STATUS/ |
| BTR |
| PENDING BTR STATUS |
| B3:5 +COP---------------+ |
|-+----] [-----+------------------------------------------+COPY FILE +-|
| | 0 | |Source #M1:1.100| |
| | | |Dest #B3:0| |
| | | |Length 4| |
| | | +------------------+ |
| | CHECK BTR | |
| | STATUS | |
| | UNTIL DN | |
| | OR ER BIT | |
| | IS OFF | |
| | B3:5 | |
| +----] [-----+ |
| 1 |
Rung 2:2
UNLATCH THE BIT THAT CONTINUES TO CHECK THE BTR STATUS. WHEN A BTR IS
COMPLETE, THE DONE BIT IS SET. THE LADDER PROGRAM MUST THEN UNLATCH THE ENABLE
BIT, THEN WAIT FOR THE SN MODULE TO TURN OFF THE DONE BIT BEFORE ANOTHER BTR
TO THE SAME M-FILE LOCATION CAN BE INITIATED. THIS IS ONE COMPLETE BTR CYCLE.
| | CHECK BTR |
| | STATUS |
| VIRTUAL | UNTIL DN |
| BTR DONE | OR ER BIT |
| BIT | IS OFF |
| B3:0 B3:5 |
|-+----]/[-----+-------------------------------------------------------(U)-----|
| | 13 | 1 |
| | | |
| | VIRTUAL | |
| | BTR ERROR | |
| | BIT | |
| | B3:0 | |
| +----]/[-----+ |
| 12 |