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

Page 101

Advertising
background image

Programming Techniques

Chapter 7

7-4

Program Operation in the Primary System
In the primary system’s program, COP instructions move data with a block ID
of 1 to the BTW data file of the primary processor, where it remains until a
block ID of 2 (1+1) is requested through a BTR of the primary 1785-BCM
module. When this happens, another COP instruction is enabled. This COP
moves data with a block ID of 2 to the BTW data file, where it remains until a
block ID of 3 (2+1) is requested by the 1785-BCM module. This sequence
continues until the last block of the segment (block ID = segment length) is
transferred.

After the primary processor sends the last block of data to the primary
1785-BCM module and then executes a BTR to get the module’s status, the
module returns a block ID of 1. This tells the primary processor to send a new
segment of data. In addition, the primary 1785-BCM module notifies the
secondary 1785-BCM module that it has a complete segment in its (the primary
1785-BCM module’s) buffer.

If an error occurs during the transmission of a block from the primary processor
to its 1785-BCM module, the module requests a re-transmission of that block,
and the block ID is not incremented. (The rungs that contain the COP
instructions are responsible for triggering the re-transmission.) Blocks that are
transferred from the primary processor to the primary 1785-BCM module are in
turn sent to the secondary 1785-BCM module. The secondary 1785-BCM
module stores all of the data blocks received and sends these blocks to the
secondary processor, one at a time, by means of a BTR instruction.

Program Operation in the Secondary System
Using the one-block-at-a-time method, the secondary processor executes the
same program as the primary, except that its linked COP structure checks the
block ID of the BTR instruction and moves the data from the BTR into memory
at the proper starting address.

The secondary 1785-BCM module sequences through the blocks sent from the
primary module. Successive BTR commands return successive blocks from the
module to the local processor. The secondary module does not alter the block
ID received from the primary module when sending the block to the secondary
processor, but rather shows the block ID of the current transfer.

Advertising