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

Page 69

Advertising
background image

D–19

Sample Ladder Listing

Publication 1403-5.1

Rung 3:4
| BT |BT enable |Virtual |Virtual BT Done |
| Initiate |bit |BT Done |BT Err Bit |
| Bit | |Bit |Bit |
| N15:6 N[N9:0]:0 N15:0 N15:0 N[N9:0]:0 |
|––––] [––––––––]/[––––––––]/[––––––––]/[–––––––––––––––––––––––+––––(U)–––––+–|
| 0 15 13 12 | 13 | |
| | BT Error | |
| | Bit | |
| | N[N9:0]:0 | |
| +––––(U)–––––+ |
| | 12 | |
| | Service | |
| | The BT | |
| | Status/ | |
| | BT | |
| | Pending | |
| | N15:5 | |
| +––––(L)–––––+ |
| | 0 | |
| | BT enable | |
| | bit | |
| | N[N9:0]:0 | |
| +––––(L)–––––+ |
| | 15 | |
| | BT | |
| | Initiate | |
| | Bit | |
| | N15:6 | |
| +––––(U)–––––+ |
| 0 |
Rung 3:5
| BT enable |
| bit |
| N[N9:0]:0 +COP–––––––––––––––+ |
|–+––––] [–––––+––––––––––––––––––––––––––––––––––––––––––+COPY FILE +–|
| | 15 | |Source #N[N9:0]:0| |
| | | |Dest #M0:2.100| |
| | | |Length 3| |
| | | +––––––––––––––––––+ |
| | Virtual | |
| | BT Done | |
| | Bit | |
| | N15:0 | |
| +––––] [–––––+ |
| | 13 | |
| | Virtual | |
| | BT Err | |
| | Bit | |
| | N15:0 | |
| +––––] [–––––+ |
| 12 |
Rung 3:6
| BT enable |BT |Virtual |Virtual BT Error BT Done |
| bit |Initiate |BT Done |BT Err Code Bit |
| |Bit |Bit |Bit |
| N[N9:0]:0 N15:6 N15:0 N15:0 +EQU–––––––––––––––+ N[N9:0]:0 |
|––––]/[––––––]/[––––––]/[–––––––]/[–––––+–+EQUAL +––––––(L)–––––+–|
| 15 0 13 12 | |Source A N15:4| 13 | |
| | | 0| | |
| | |Source B 0| | |
| | | | | |
| | +––––––––––––––––––+ | |
| | BT Error BT Error | |
| | Code Bit | |
| | +NEQ–––––––––––––––+ N[N9:0]:0 | |
| +–+NOT EQUAL +––––––(L)–––––+ |
| |Source A N15:4| 12 |
| | 0| |
| |Source B 0| |
| | | |
| +––––––––––––––––––+ |
Rung 3:7
| +RET–––––––––––––––+ |
|–––––––––––––––––––––––––––––––––––––––––––––––––––––––––+RETURN +–|
| +––––––––––––––––––+ |
Rung 3:8
| |
|–––––––––––––––––––––––––––––––––––––+END+––––––––––––––––––––––––––––––––––––|
| |

Rung 3:4

When a new BTR is initiated,
latch the enable bit, as long as a
BTR is not in progress. Also,
latch the BTR pending bit, so
the BTR status file will be BTR
by the ladder program. Because
this rung marks the beginning
of the BTR, both the done and
error bits for the block transfer
control word are unlatched
along with the block transfer
initiate bit.

Rung 3:5

Move the virtual control words
to the M0 file for the SN
module whenever a transition of
the BTR enable bit occurs.

Rung 3:6

If all the conditions of this rung
are true, the BTR cycle is
complete. Latch the control
word done bit if the error word
at N15:4 is clear, or the control
word error bit if it is not.

Rung 3:7

Return from subroutine.

Rung 3:8

End of file.

Advertising