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

Page 66

Advertising
background image

D–16

Sample Ladder Listing

Publication 1403-5.1

Rung 2:24
Load next setpoint into setpoint write data location.
| One Shot 5 Status – Setpoint Setpoint |
| Bad Table Counter Number |
| Check Done Bit |
| +EQU––––––––––+ B3 +EQU––––––––––––––+ C5:0 +CTU––––––––––––+ |
|–+EQUAL +–[OSR]–+–+–+EQUAL +–+–]/[–+COUNT UP +–(CU)–+–|
| |Source A N9:0| 304| | |Source A N82:36| | DN|Counter C5:0+–(DN) | |
| | 40| | | | 0| | |Preset 3| | |
| |Source B 56| | | |Source B 0| | |Accum 3| | |
| | | | | | | | +–––––––––––––––+ | |
| +–––––––––––––+ | | +–––––––––––––––––+ | | |
| | | Prepare | | |
| | | Initial | | |
| | | Setpoint | | |
| | | Write | | |
| | | +EQU––––––––––––––+ | | |
| | +–+EQUAL +–+ | |
| | |Source A C5:0.ACC| | |
| | | 3| | |
| | |Source B 0| | |
| | | | | |
| | +–––––––––––––––––+ | |
| | Setpoint | |
| | Data | |
| | Address | |
| | +ADD–––––––––––––––+ | |
| +––––––––––––––––––––––––––+ADD +––––––+ |
| | |Source A 21| | |
| | | | | |
| | |Source B C5:0.ACC| | |
| | | 3| | |
| | |Dest N20:1| | |
| | | 24| | |
| | +––––––––––––––––––+ | |
| | Move | |
| | Current | |
| | Setpoint | |
| | Data Into | |
| | BTW Table | |
| | +COP–––––––––––––––+ | |
| +––––––––––––––––––––––––––+COPY FILE +––––––+ |
| |Source #N[N20:1]:1| |
| |Dest #N86:1| |
| |Length 20| |
| +––––––––––––––––––+ |

Rung 2:25
Perform appropriate block transfer write.
| +EQU–––––––––––––––+ +JSR–––––––––––––––+ |
|–+EQUAL +––––––––––––––––––––––––––––––––––––+JUMP TO SUBROUTINE+–|
| |Source A N9:0| |SBR file number 4| |
| | 40| +––––––––––––––––––+ |
| |Source B 56| |
| | | |
| +––––––––––––––––––+ |
Rung 2:26
| |
|–––––––––––––––––––––––––––––––––––––+END+––––––––––––––––––––––––––––––––––––|
| |

Rung 2:26

End of file.

Rung 2:24

This rung is activated once
when the sequencer output file
changes to setpoint BTW. Its
purpose is to determine the
address of the next setpoint data
and to copy the data residing at
this address into the setpoint
BTW data location. This is
accomplished by first adding an
address offset to a base address
to determine the location of the
next setpoint data. The data
residing at the resulting address
is then transferred to the
setpoint BTW data location. A
counter is used to determine the
address offset. Prior to the first
setpoint BTW, the counter is
automatically incremented. For
subsequent setpoint BTWs, the
counter is incremented when
the diagnostic table BTR for the
previous setpoint BTW is
successful. For example, the
3rd setpoint will reside at base
address 24. In this case, a
counter value of 3 will be added
to the base address 21. The
data residing at location 24 will
then be transferred into the
setpoint BTW data location
N86:1.

Rung 2:25

Setpoint BTW.

Advertising