If you are using multiple reads and writes in the RLL program, you need 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, rungs 3 and 4 show that C100 will get set after the RX
instruction has been executed. When the port has finished the communication task, the
second routine is executed and C100 is reset. If you're using RLL
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.
This rung does a Modbus write to the first holding register 40001 of slave address number one.
It writes the values over that reside in V2000. This particular function code only writes to one
register. Use function code 16 to write to multiple registers. Only one Network Instruction
(WX, RX, MWX, MRX) can be enabled in one scan. That is the reason for the interlock bits. For using
many network instructions on the same port, use the Shift Register instruction.
Port 2 Busy bit
SP116
3
This rung does a Modbus read from the first 32 coils of slave address number one.
It will place the values into 32 bits of the master starting at C0.
Port 2 Busy bit
SP116
4
Chapter 4: System Design and Configuration
Instruction Interlock bit
C100
Instruction Interlock bit
C100
DL205 User Manual, 4th Edition, Rev. B
PLUS
Stage Programming,
MWX
Port Number:
Slave Address:
Function Code: 06 - Preset Single Register
Start Slave Memory Address:
Start Master Memory Address:
Number of Elements:
Modbus Data Type:
Exception Response Buffer:
Instruction interlock bit
C100
( SET )
MRX
Port Number:
Slave Address:
Function Code:
01 - Read Coil Status
Start Slave Memory Address:
Start Master Memory Address:
Number of Elements:
Modbus Data Type:
Exception Response Buffer:
Instruction interlock bit
C100
( RST )
1
2
3
4
5
6
7
K2
8
K1
40001
9
V2000
n/a
584/984 Mode
10
V400
11
12
13
K2
K1
14
1
C0
A
32
584/984 Mode
V400
B
C
D
4–53
Need help?
Do you have a question about the DirectLOGIC DL205 Series and is the answer not in the manual?