User manual

Programming Techniques
Chapter 7
7-5
In addition, the secondary 1785-BCM module compares the segment length
specified in the secondary program’s BTW instruction with the segment length
sent by the primary 1785-BCM module. If the segment lengths are different,
the secondary 1785-BCM module turns on the programming error bit (bit 3 is
local, bit 11 is remote).
Figure 7.2 shows how a program that uses the one-block-at-a-time method
works.
Figure 7.2
Program
Flow for T
ransferring Data One Block at a T
ime
BTR
BTW
MAIN
PROGRAM
DECIDE
PRI/SEC
RUN PRI
SUBROUTINE
RUN SEC
SUBROUTINE
MOVE CRITICAL DA
TA
TO BTW FILE
CHECK BTR BLOCK ID
SET
BTW BLOCK ID T
O
EQUAL
BTR BLOCK ID
MOVE BTW DATA
CHECK BTR BLOCK ID
MOVE BTR DA
TA
MOVE DA
TA TO FILE
PRIMARY
SECONDARY
11109I