EasyManua.ls Logo

Automationdirect.com HX-ECOM Series - Integrating Multiple Read and Write Instructions; Interlocking Relays

Automationdirect.com HX-ECOM Series
129 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Ethernet Communications Modules, 3rd Edition, Rev. D
4–17
Chapter 4: RLL Programming for Communications
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Integrating Multiple Read and Write Instructions
Multiple Read and Write instructions require interlocks for sequencing because only one RX/
WX instruction can be processed per CPU scan. Using interlocks, one RX/WX instruction
is processed in each scan until all RX/WX instructions have been executed. After the last
instruction, the sequence then begins again at the first RX/WX instruction.
Without interlocks, the RX/WX instructions would be executed in an unpredictable order,
and some might be executed many times before others are executed once. The interlocks serve
to open (disconnect) the ladder circuits for all Read and Write instructions except the one that
should be processed on the current CPU scan.
Note: To simplify programming when using an ECOM100 module, consider using IBOX instructions
ECOM100, ECRX, ECWX. These instructions handle the interlocking for the user.
Please reference Chapter 5 of the user manual for the PLC you are using.
We show two methods of creating the interlocks necessary for sequencing multiple Read and
Write instructions:
Sequenced Internal Control Relays
Shift Register
We will step you through the development of the interlocks using both methods. The two
examples shown perform the same function. Only the interlocks are different.
NOTE: To fully understand the material in this section, you will first need to understand the Example
Programs on pages 4-13 and 4-15, as well as the material in the Network Instructions section, beginning on
page 4-3.
The following program segment sequences through three RX/WX instructions (two Write
instructions and one Read instruction). You can develop your own program incorporating
either of the two interlocking control strategies and expanding the number of interlocks to
accommodate the number of RX/WX instructions in your program.
Interlocking Relays
It is easy to see the function of the interlocking relays if we construct a truth table first.
Across the top of the truth table we show
internal control relays that we are considering
using for our sequencing strategy. We have
used C50 through C52 for our chart, but any
contacts that are not used for other purposes in
your program will work just as well.
Down the left side of the chart, we list the
number of RX/WX instructions we may want
to use in our RLL program.
The three contacts in this truth table will
accommodate as many as eight Read or Write instructions. Our program only has three RX/
WX instructions so we only need to use two contacts (see why on page 4-18). We will use C50
and C51. One additional contact (C53) would give us 32 combinations since the number of
combinations expands as the power of 2.
Truth Table C52 C51 C50
First RX/WX 0 0 0
Second RX/WX 0 0 1
Third RX/WX 0 1 0
Fourth RX/WX 0 1 1
Fifth RX/WX 1 0 0
Sixth RX/WX 1 0 1
Seventh RX/WX 1 1 0
Eighth RX/WX
1 1 1

Table of Contents