EasyManua.ls Logo

Automationdirect.com HX-ECOM Series - Page 62

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–16
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 X0
is a toggle switch input to a discrete input module.
When X0 is on, Control Relay C0 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 DirectLOGIC 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 take the C100
contact and convert it to a real output, Y0.
LD
K0114
LD
K2
LDA
O40600
RX
VC100
SP122
1140
ECOM ModuleID
K
BCD
UpperByte
LowerByte
Responding PLC
Initiating PLC
Base Number
ECOM Slot Number
)evalS()retsaM(
OUT
C0
X0
SET
SP123
Y1
END
END
OUT
C0
X0
OUT
Y0
C0
SET
SP123
Y1
END
END
OUT
Y0
C100
Rung 3
The Special Relay labeled SP122 is on when slot 1 is
busy transmitting or receiving. The Write instruction
may take longer than one PLC scan to complete. Use
this Special Relay to prevent overwriting the previous
Write instruction with each PLC scan.

Table of Contents