Mewtocol-Com Master Communication (Recv); Read Data From An External Device - Panasonic FP7 User Manual

Cpu unit. com port communication
Hide thumbs Also See for FP7:
Table of Contents

Advertisement

MEWTOCOL
Master/Slave Communication

5.3 MEWTOCOL-COM 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 and writing can be done simply by specifying the station no. and memory
address and executing SEND/RECV commands.
PLC
DT100
100
DT101
0
・・・・・・
・・・・・・・・
・・・・・・
・・・・・・・・
 Sample program
 Send commands from the COM1 port of the CPU unit, read data from the data area of an
external device (station no. 1) DT400 - DT401, and write the content into PLC's data register
DT100 - DT101.
 Confirm that the unit is in the master mode (XC), and that the sending process is not in
progress for the same port (YC), and start up the SEND command.
 In the UNITSEL command, specify the slot No. (U0) and the COM. port 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
DF
Clear to send
master
communication flag
R100
RECV.US
5-4
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: info@clrwtr.com
Command message
%01#RD0040000401 (BCC) C
%01$RD64000000 (BCC) C
Response message
Specify and read station no. and address based on RECV command
XC
YC
Sending master
communication flag
UNITSEL
U1
DT400
S1
S2
R
R
R100
Execute
RECV
U0
U1
S1
S2
U2
DT100
DT0
n
D1
D2
External device supporting
MEWTOCOL-COM
DT00400
100
DT00401
0
・・・・・・
・・・・・・・・
・・・・・・
・・・・・・・・
Starting conditions for RECV
execution
Clear to send flag: ON
Sending flag: OFF
Settings for communication port
S1: Slot 0
S2: COM1
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)

Advertisement

Table of Contents
loading

Table of Contents