EasyManua.ls Logo

Panasonic FP7 CPU Unit - MEWTOCOL Master Communication (RECV); Read Data from an External Device

Panasonic FP7 CPU Unit
92 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
MEWTOCOL Master/Slave Communication
5.3 MEWTOCOL Master Communication (RECV)
5.3.1 Read Data From an External Device
Instructions
In master communication, PLC has the sending right, and executes communication by
sending commands to devices that support MEWTOCOL, and receiving responses.
Messages in accordance with the protocol are automatically generated by PLC. In the user
program, reading can be done simply by specifying the station no. and memory address and
executing RECV commands.
Our PLC supporting
MEWTOCOL-DAT
(Hex) 80 51 09 90 01 02 00
(Hex) 80 D1 FF 64 00 00 00
Command message
Response message
・・・・・・・・・・・・・・
・・・・・・・・・・・・・・
0DT101
100DT100
・・・・・・・・・・・・・・
・・・・・・・・・・・・・・
0DT00401
100DT00400
PLC
Specify and read/write address based on SEND/RECV command
Note: The above figure indicates the data part of MEWTOCOL-DAT. In communication via LAN, a header including size information of the sent data
is added.
Sample program
Send commands from the LAN port of the CPU unit, read data from the data area of an
external device DT400 - DT401, and write the content into PLC's data register DT100 -
DT101.
Confirm that Connection 1 is established in the master mode (X90), and that the sending
process is not in progress for the same port (Y90), and start up the SEND command.
In the UNITSEL command, specify the slot No. (LAN port: U100) and the connection No. (U1).
In the RECV command, specify and execute the partner station no. (U1), initial address
(DT400), No. of data (U2), and initial address on the PLC side to save data (DT100).
R0
Clear to send
master
communication flag
R100
UNITSEL U100 U1
RECV.US DT0U2 DT100U1 DT400
X90 Y90
Sending master
communication flag
R100
Execute
RECV
Starting conditions for RECV
execution
Clear to send flag: ON
Sending flag: OFF
RECV processing
S1: Partner station no. (U1)
S2: Data address (DT400)
n: No. of data (U2)
D1: Data saving area (DT100)
D2: Execution result code (DT0)
DF
S1
S2
S1 S2 n D1 D2
Settings for communication port
S1: CPU LAN port (U100)
S2: Connection 1 (U1)
5-4

Table of Contents

Related product manuals