Rockwell Automation 1403-NSC Smart Communication Card Instruction Sheet User Manual

Page 70

Advertising
background image

D–20

Sample Ladder Listing

Publication 1403-5.1

BTW ( File 4 )

Rung 4:0
| Service BT Status |
| The BT |
| Status/ |
| BT |
| Pending |
| +SBR–––––––––––––––+ N15:5 +COP–––––––––––––––+ |
|–+SUBROUTINE +–+––––] [–––––+–––––––––––––––––––––+COPY FILE +–|
| +––––––––––––––––––+ | 0 | |Source #M1:2.200| |
| | | |Dest #N15:0| |
| | | |Length 4| |
| | | +––––––––––––––––––+ |
| | Check BT | |
| | Status | |
| | Until DN | |
| | or ER Bit | |
| | Is Off | |
| | N15:5 | |
| +––––] [–––––+ |
| 1 |
Rung 4:1
| Virtual Check BT |
| BT Done Status |
| Bit Until DN |
| or ER Bit |
| Is Off |
| N15:0 N15:5 |
|–+––––]/[–––––+–––––––––––––––––––––––––––––––––––––––––––––––––––––––(U)–––––|
| | 13 | 1 |
| | Virtual | |
| | BT Err | |
| | Bit | |
| | N15:0 | |
| +––––]/[–––––+ |
| 12 |
Rung 4:2
| Virtual Service |
| BT Done The BT |
| Bit Status/ |
| BT |
| Pending |
| N15:0 N15:5 |
|––––] [––––––––––––––––––––––––––––––––––––––––––––––––––––––––+––––(U)–––––+–|
| 13 | 0 | |
| |
| |
| | BT enable | |
| | bit | |
| | N[N9:0]:0 | |
| +––––(U)–––––+ |
| | 15 | |
| | Check BT | |
| | Status | |
| | Until DN | |
| | or ER Bit | |
| | Is Off | |
| | N15:5 | |
| +––––(L)–––––+ |
| 1 |

Rung 4:0

Copy the BTW status area to a
file which will be used
throughout the program, only
when a BTW is pending. This
avoids accessing the M1 file
multiple times during each 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
processor scan time.

Rung 4:1

Unlatch the bit that continues to
check the BTW status. When a
BTW is complete, the done bit
is set. The ladder must then
unlatch the enable bit, then wait
for the SN module to turn off
the done bit before another
BTW to the same M-file
location can be initialized.

Rung 4:2

When a BTW successfully
completes, unlatch the BTW
enable bit. Also, unlatch the
BTW pending bit and unlatch
the bit that continues checking
the BTW status until the SN
module turns off the done bit.

Advertising