Ethernet Communications Modules, 3rd Edition, Rev. D
5-19
Chapter 5: MODBUS TCP for H0/H2/H4-ECOM100
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Building the Read (RX) or 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. They must be used in
the sequence shown. The following step-by-step procedure
will provide you the information necessary to set up your
ladder program to receive data from a network server.
NOTE:
Please review intelligent instructions (IBOX) in Chapter 5 of the user manual for the PLC you are
using, which simplifies this and other functions.
Consider the following IBOX instructions: ECOM100, ECRX and ECWX.
Step 1: Identify ECOM Slot Location and Server Node #
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.
LDA
O aaa
LD
A aaa
LD
A aaa
RX or WX
A aaa
LD
K114
1 1 4
0
K
Upper Byte Lower Byte
Responding
device
Initiating PLC/ECOM
(Client)
(Server)
Server Node #
Base Number
ECOM Slot Number
CPU Base = 0
See page 2-7 and 2-8 about
slot numbers.
See page 2-7 and 2--9 about us-
ing ECOMs in local expansion or
in remote I/O bases.
Expansion Base = 1, 2 or 3
See page 3--10 or 6--4 about
assigning a node number to a
server’s IP address
Initiating PLC
Responding Device on Network