Rockwell Automation 1785-BCM_BEM, D17856.5.4 PLC-5 Backup Communication Module User Manual User Manual

Page 132

Advertising
background image

Sample Programs

Appendix A

A-14

Program file 9 contains the secondary subroutine. This file:

checks the block ID of the BTR and copies the BTR data with a series

of rung pairs, for example, rungs 9:1 and 9:2. (Because we want to
transfer 3 blocks at a time in this sample, the program contains 3 of
these rung pairs. You can modify your program to transfer from 1 to 16
blocks per segment by adding or deleting rung pairs to this file.)

moves the BTR data to the proper address in file N33

Program file 10 contains the primary subroutine: This file:

moves data to the BTW file from file N34

copies the BTW file and performs the BTW with a series of rungs, for

example, rung 10:2. (Because we want to transfer 3 blocks at a time in
this sample, the program has 3 rungs. You can modify your program to
transfer from 1 to 16 blocks (PLC-5/15 or PLC-5/25 processor) or from
1 to 64 blocks (PLC-5/20, -5/30, -5/40, -5/60, or -5/80 processor) by
adding or deleting rungs like 10:2 from file 10.)

Program file 11 contains diagnostic rungs that count errors in your
program. These rungs are especially helpful when starting up and
debugging a backup system for the first time.

The sample program for method 2 is on the following pages. Refer to rung
comments for more information about the function of specific rungs.
Table A.C, following the sample program, lists the data table transfer time
using this method of programming for transferring 1, 3, 7, 10, and 16
blocks of data.

SAMPLE 1771–BCM MULTIPLE BLOCK PROGRAM 21 November 1994 Page 1
Program Listing Report PLC–5/25 File MULTBLKS Rung 2:0

Rung 2:0
THIS RUNG WILL OBTAIN STATUS INFORMATION FROM THE BCM AND WHEN THE PROCESSOR IS
SECONDARY IT WILL ALSO OBTAIN DATA FROM THE BCM.
| BTR 1 |BTW 1 |
| EN |EN BTR 1 |
| N30:0 N30:5 +BTR––––––––––––––––––––+ |
+––––]/[––––––––]/[–––––––––––––––––––––––––––––+BLOCK TRNSFR READ +–(EN)–+
| 15 15 |Rack 00| |
| |Group 0+–(DN) |
| |Module 0| |
| |Control Block N30:0+–(ER) |
| |Data file N31:1| |
| |Length 0| |
| |Continuous N| |
| +–––––––––––––––––––––––+ |

Advertising