Mewtocol-Com Master Communication (Send); Write Data Into An External Device - Panasonic AFP7CPS4E User Manual

Fp7 series, programmable controller
Table of Contents

Advertisement

MEWTOCOL
Master/Slave Communication

7.4 MEWTOCOL-COM Master Communication (SEND)

7.4.1 Write Data into 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 instructions.
PLC
DT100
100
DT101
0
・・・・・・
・・・・・・・・
・・・・・・
・・・・・・・・
 Sample program
 Send commands from the COM1 port of the CPU unit, and write the content of PLC's data
register DT100 - DT101 into the data area of an external device (station no. 1) DT400 -
DT401.
 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 instruction.
 In the UNITSEL instruction, specify the slot No. (U0) and the COM. port No. (U1).
 In the SEND instruction, specify and execute the sender initial address (DT100), No. of data
(U2), "Transmit to" station no. (U1), and initial address (DT400).
R0
DF
Master
communication
Clear to send flag
R100
SEND.US
(Note) The unit number and COM port number in the above program is applied when the COM.1 port of the CPU unit
is used.
7-8
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: info@clrwtr.com
Command message
%01#WDD004000040164000000 (BCC) C
%01$WD (BCC) C
Response message
Specify and write station no. and address based on SEND instruction
XC
YC
Master
communication
Sending active flag
UNITSEL
DT100
U2
S1
n
R
R
R100
Execute
SEND
U0
U1
S1
S2
U1
DT400
DT0
D1
D2
D3
External device supporting
MEWTOCOL-COM
DT00400 100
DT00401 0
・・・・・・
・・・・・・・・
・・・・・・
・・・・・・・・
SEND execution condition
Clear to send flag: ON
Sending active flag: OFF
Settings for communication port
S1: Slot 0 (U0)
S2: COM1 (U1)
SEND process
S: Data saving area (DT100)
n: No. of sent data (U2)
D1: Area code of the receiver (U1)
D2: "Forward to" address (DT400)
D3: Execution result code (DT0)

Advertisement

Table of Contents
loading

Table of Contents