EasyManua.ls Logo

Automationdirect.com HX-ECOM Series - Network Instructions; Read (RX) and Write (WX) Instructions; Building the Read (RX) and Write (WX) Routine; The First LD Instruction

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–3
Chapter 4: RLL Programming for Communications
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Network Instructions
Read (RX) and Write (WX) Instructions
The Read (RX) and Write (WX) instructions are used by the initiating PLC to Read a block of
data from another PLC or Write a block of data to another PLC. To perform their functions, the
RX and WX boxes must be preceded in the ladder logic program by two Load instructions and
one Load Address instruction.
The Load and Load Address instructions load communication parameters into the accumulator
and the first and second level of the accumulator stack. The RX or WX instruction takes these
parameters from the stack and the accumulator and prepares the data to be sent over the network.
If you need to know more about the function of the accumulator and the accumulator stack,
refer to the User Manual for your PLC.
NOTE: Please review intelligent instructions (IBOX) in Chapter 5 of the user manual for the PLC you are
using, which simplify this and other functions.
Consider the following IBOX instructions: ECOM100, ECRX and ECWX. Building the Read (RX) or Write
(WX) Routine
Building the Read (RX) and Write (WX) Routine
For network communications, you build the Read (RX) or Write
(WX) instructions into a routine which requires the four instructions
you see to the right. The function of each of these instructions is
explained below or on the next page. They must be used in the
sequence shown.
The First LD Instruction
The first Load (LD) instruction accepts either a constant or a
variable. Use a “K” to designate the number as a constant. Use a
“V” if you are entering the address of a register. The contents of that
register perform the same function as the constant shown below. For
example, you could use V2000 in place of K0114. If the contents of
V2000 is the number “114,” the function would be the same. Using a variable allows changing
parameters while the program is running. It is recommended, however, to use a constant when
possible.
Responding PLC
(Slave)
Initiating PLC
(Master)
LD
K114
K 0 1 1 4
Upper Byte Lower Byte
Base Number
CPU Base = 0
Expansion Base = 1, 2 or 3
See page 2-7 and 2-9 about using
ECOMs in local expansion or in
remote I/O bases.
Initiating PLC
Expansion Base = 1, 2 or 3
See page 2-7 and 2-9 about
slot numbers.
Responding PLC
Expansion Base = 1, 2 or 3
See page 2-3 and 3-8 about
setting the Module ID.
ECOM Slot Number ECOM Module ID
LDA
O aaa
LD
A aaa
LD
A aaa
RX or WX
A aaa

Table of Contents