Mitsubishi MELSEC-Q/L Programming Manual page 697

Table of Contents

Advertisement

(b) Program example when the D(P).DDWR instructions are executed concurrently
The following shows a program example that writes ZR0 to ZR999 (1000 points) in CPU No.1 to ZR0 to ZR999 in
CPU No.2 with the D.DDWR instruction.
As shown on the program example, multiple CPU device write/read instructions can be executed concurrently.
When reading/writing devices with the multiple CPU high-speed transmission dedicated instructions concurrently,
the more the total number of blocks in the multiple CPU high speed transmission area (send area), the more the
time taken to complete reading/writing with the multiple CPU high-speed transmission dedicated instruction can be
shortened.
Program example when the D(P).DDWR instructions are executed concurrently
The maximum number of used blocks for multiple CPU high-speed
transmission dedicated instruction setting is set to CPU No.2
SM402
0
Turn-on for one
scan after RUN
Data writing is started at the rise of the write command (X0)
X0
M0
39
Write
During
command
writing
First DDWR instruction, Second DDWR instruction
M0
70
During
writing
M7
Execution request of the next
DDWR instruction
The first DDWR instruction is executed
SM797
M1
94
During execution
Number of used
of the DDWR
blocks information
instruction 1
(CPU No.2)
The second DDWR instruction is executed
SM797
M2
126
Number of used 3
During execution
blocks information
of the DDWR
instruction 2
(CPU No.2)
When the DDWR instruction is completed abnormally, the annunciator is turned on and data writing is stopped
M3
M4
158
Completion
Error
device 1
completion
device 1
M5
M6
Completion
Error
device 2
completion
device 2
Next data writing is requested at normal completion of the second DDWR instruction
M5
M6
197
Completion
Error
device 2
completion
device 2
241
D.DDWR H3E1
D.DDWR H3E1
<
Z2
K1000
=
Z2
K1000
MOV
K7
MOV
K100
MOV
K100
RST
SET
SET
SET
D0
ZR0Z2
ZR0Z2
Completion
Write
source write
status 1
destination
RST
D2
ZR100Z2
ZR100Z2 M5
Completion
Write
source write
status 2
destination
RST
SET
RST
+
K200
PLS
RST
1
10
3
4
SD797
Maximum number of
used blocks
(CPU No.2)
6
D1
Number of
write points 1
D3
Number of
write points 2
6
Z2
M0
7
During writing
M1
During execution of
8
the DDWR instruction 1
M2
During execution of
the DDWR instruction 2
M3
Completion
device 1
M1
During execution of the
DDWR instruction 1
Completion
device 2
M2
During execution of the
DDWR instruction 2
F0
DDWR instruction
error display
M0
During
writing
Z2
M7
Execution request of the
next DDWR instruction
M0
During writing
END
695

Advertisement

Table of Contents
loading

Table of Contents