Ethernet Communications Modules, 3rd Edition, Rev. D
4–14
Chapter 4: RLL Programming for Communications
1
2
3
4
5
6
7
8
9
10
11
12
13
14
A
B
C
D
Rung 1
In our example, the normally open contact labeled C0
is an internal control relay. When C0 is on, discrete
output Y0 is energized.
Rung 2
The second rung uses a Special Relay to identify a
communication error. In the example, SP123 is on
if a communication error is present for slot one. Use
different Special Relays if your ECOM module is in a
different slot (see page 4-11 and 4-12). We use SP123
to turn on an indicator light connected to a discrete
output.
Number of bytes to be transferred. Max = 128 bytes
Beginning address in the initiating PLC, expressed as
an octal number.
Beginning address in the responding PLC.
Rung 4
All
Direct
LOGIC PLCs use an END statement
to identify the final rung of the main body of the
program.
Program for the Responding PLC
This two-rung program resides in the responding
PLC’s CPU. Its function is simply to use the X0
contact to turn on the internal control relay, C100.
LD
K0114
LD
K2
LDA
O40600
RX
VC100
SP122
1 1 4
0
ECOM Module ID
K
BCD
Upper Byte Lower Byte
Responding PLC
Initiating PLC
Base Number
ECOM Slot Number
)
e
v
a
l
S
(
)r
e
t
s
a
M
(
OUT
Y0
C0
SET
SP123
Y1
END
END
OUT
C100
X0
OUT
Y0
C0
SET
SP123
Y1
END
END
OUT
C100
X0
Rung 3
The Special Relay labeled SP122 is on when slot 1 is
busy transmitting or receiving. The Read instruction
may take longer than one PLC scan to complete.
Use this Special Relay to prevent overwriting the
previous Read instruction with each PLC scan.