MODBUS R
T
U
D0–DCM with
5–14
D0–DCM Using MODBUS
DL05/06 Data Communications Module, 1st Edition, 08/05
Typically network communications will
last longer than 1 scan. The program must
wait for the communications to finish
before starting the next transaction.
DCM Communication Error
LD
K114
LD
K3
LDA
O40600
RX
V0
SP120
DCM Port Busy
SP121
SET
Y1
Depending on which slot the DCM is in, it has two Special Relay contacts associated
with it (see page 5–12 for special relays). One indicates “Port busy”, and the other
indicates “Port Communication Error”. The example above shows the use of these
contacts for an ECOM that is in slot 1. The “Port Busy” bit is on while the PLC
communicates with the slave. When the bit is off the program can initiate the next
network request.
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 ahead of any network instruction
boxes since the error bit is reset when an RX or WX instruction is executed.
If you are using multiple reads and writes
in the RLL program, you have to interlock
the routines to make sure all the routines
are executed. If you don’t 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.
In the example to the right, after the RX
instruction is executed, C0 is set. When
the port has finished the communication
task, the second routine is executed and
C0 is reset.
If you are using RLL
PLUS
Stage
Programing, you can put each routine in a
separate program stage to ensure proper
execution and switch from stage to stage
allowing only one of them to be active at a
time.
Interlocking Relay
LD
K114
LD
K3
LDA
O40600
RX
V0
SP120
SET
C100
C100
LD
K114
LD
K3
LDA
O40400
WX
V0
SP120
RST
C100
C100
Interlocking
Relay
Communications
from a
Ladder Program
Multiple Read and
Write Interlocks
Summary of Contents for D0-DCM
Page 1: ...D0 DCM Data Communications Module Manual Number D0 DCM M...
Page 8: ......
Page 9: ...1 1 Introduction In This Chapter Manual Overview D0 DCM Hardware Features D0 DCM Applications...
Page 24: ......
Page 56: ......
Page 57: ...1 5 D0 DCM Using MODBUSr RTU In This Chapter Network Slave Operation Network Master Operation...