User Application
Guidelines
RLL
Programming
for Communications
4–13
RLL Programming for Communications
DL05/06 Data Communications Module, 1st Edition, 08/05
Integrating Multiple Read and Write Instructions
Multiple Read and Write instructions require interlocks for sequencing because only
one RX/WX instruction can be processed at once. 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.
We show two methods of creating the interlocks necessary for sequencing multiple
Read and Write instructions:
S
Sequenced Internal Control Relays
S
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–9 and 4–11, 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.
It is easy to see the function of the interlocking relays if we construct a truth table first.
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
Interlocking
Relays
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-14). 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.
Содержание D0-DCM
Страница 1: ...D0 DCM Data Communications Module Manual Number D0 DCM M...
Страница 8: ......
Страница 9: ...1 1 Introduction In This Chapter Manual Overview D0 DCM Hardware Features D0 DCM Applications...
Страница 24: ......
Страница 56: ......
Страница 57: ...1 5 D0 DCM Using MODBUSr RTU In This Chapter Network Slave Operation Network Master Operation...