beautypg.com

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

Page 72

background image

D–22

Sample Ladder Listing

Publication 1403-5.1

Rung 4:5
| BT enable |
| bit |
| N[N9:0]:0 +COP–––––––––––––––+ |
|–+––––] [–––––+––––––––––––––––––––––––––––––––––––––––––+COPY FILE +–|
| | 15 | |Source #N[N9:0]:0| |
| | | |Dest #M0:2.200| |
| | | |Length 3| |
| | | +––––––––––––––––––+ |
| | Virtual | |
| | BT Done | |
| | Bit | |
| | N15:0 | |
| +––––] [–––––+ |
| | 13 | |
| | Virtual | |
| | BT Err | |
| | Bit | |
| | N15:0 | |
| +––––] [–––––+ |
| 12 |
Rung 4: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 4:7
| +RET–––––––––––––––+ |
|–––––––––––––––––––––––––––––––––––––––––––––––––––––––––+RETURN +–|
| +––––––––––––––––––+ |
Rung 4:8
| |
|–––––––––––––––––––––––––––––––––––––+END+––––––––––––––––––––––––––––––––––––|
| |

Rung 4:5

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

Rung 4:8

End of file.

Rung 4:7

Return from subroutine.

Rung 4:6

If all the conditions of this rung
are true, the BTW 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.