Mitsubishi Electric MELSEC iQ-R-R00CPU User Manual page 315

Melsec iq-r series cpu module application user's manual
Table of Contents

Advertisement

Data guarantee for communication through direct access
The behavior varies depending on the area to be accessed.
■When accessing CPU buffer memory:
The program reads data in ascending order from the start address of the CPU buffer memory other than the refresh area, and
the write instruction writes send data in descending order from the end address of the CPU buffer memory other than the
refresh area. Therefore data inconsistency can be avoided by setting an interlock device at the start position of data to be
communicated.
Ex.
Interlock program in communication by direct access (when accessing CPU buffer memory)
• Program example
Write
Send program (CPU No.1)
instruction
U3E0\
U3E1\
(1)
M0
G2048.0
G2048.0
Set send data for user
setting areas
(U3E0\G2049 to
U3E0\G2057).
(2)
SET G2048.0
(6)
U3E0\
U3E1\
G2048.0
G2048.0
RST G2048.0
(1) CPU No.1 creates send data.
(2) CPU No.1 turns on the data setting complete bit.
[Data transfer with CPU No.2 END processing]
(3) CPU No.2 detects send data setting complete.
(4) CPU No.2 performs receive data processing.
(5) CPU No.2 turns on receive data processing complete.
[Data transfer with CPU No.1 END processing]
(6) CPU No.1 detects receive data processing complete, and turns off the data setting complete bit.
[Data transfer with CPU No.2 END processing]
(7) CPU No.2 detects that send data setting complete is turned off, and turns off receive data processing complete.
(3)
U3E0\
U3E1\
G2048.0
G2048.0
U3E0\
(7)
U3E0\
U3E1\
G2048.0
G2048.0
U3E0\
RST M0
Receive program (CPU No.2)
(4)
Operation using
receive data
(U3E0\G2049 to
U3E0\G2057)
(5)
U3E1\
SET G2048.0
U3E1\
SET G2048.0
16 MULTIPLE CPU SYSTEM FUNCTION
16.4 Data Communication Between CPU Modules
16
313

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents