Chapter 4: System Design and Configuration
Communications from a Ladder Program
1
Typically, network communications will last
longer than one scan. The program must
wait for the communications to finish before
2
starting the next transaction.
Port 2, which can be a master, has two
3
Special Relay contacts associated with it.
One indicates "Port busy"(SP116), and the
4
other indicates "Port Communication
Error"(SP117). The example above shows
the use of these contacts for a network
5
master that only reads a device (RX). The
"Port Busy" bit is on while the PLC
6
communicates with the slave. When the bit
is off the program can initiate the next
network request.
7
The "Port Communication Error" bit turns
on when the PLC has detected an error. Use of this bit is optional. When used, it should be
8
ahead of any network instruction boxes since the error bit is reset when an RX or WX
instruction is executed.
9
Multiple Read and Write Interlocks
If you are using multiple reads and writes in the
10
RLL program, you have to interlock the routines to
make sure all the routines are executed. If you don't
11
use the interlocks, then the CPU will only execute
the first routine. This is because each port can only
handle one transaction at a time.
12
In the example to the right, after the RX instruction
is executed, C100 is set. When the port has finished
13
the communication task, the second routine is
executed and C100 is reset.
14
If you're using RLL
put each routine in a separate program stage to
ensure proper execution and switch from stage to
A
stage allowing only one of them to be active at a
time.
B
C
D
4–44
DL205 User Manual, 4th Edition, Rev. B
PLUS
Stage Programming, you can
Port Communication Error
SP117
SP116
Port Busy
SP1 16
C100
Interlocking
Relay
SP1 16
C100
Y1
SET
LD
KF201
LD
K3
LDA
O40600
RX
Y0
Interlocking Relay
LD
KF201
LD
K3
LDA
O40600
RX
Y0
C100
SET
LD
KF201
LD
K3
LDA
O40400
WX
VY0
C100
RST
Need help?
Do you have a question about the DirectLOGIC DL205 Series and is the answer not in the manual?