Mc Protocol Master Communication (Send); Writing Data To External Devices - Panasonic FP7 User Manual

Cpu unit enthernet expansion function
Hide thumbs Also See for FP7:
Table of Contents

Advertisement

9.7 MC Protocol Master Communication (SEND)

9.7.1 Writing Data to External Devices

 Procedure
The PLC has the transmission right in the master communication, and performs
communication by sending commands to devices supporting "MC protocol" and receiving
responses. By specifying a memory address and executing the SEND instruction in a user
program, the PLC generates a message according to the protocol automatically.
FP7
DT300
100
DT301
200
・・・・・・
・・・・・・・・
・・・・・・
・・・・・・・・
 Sample program
• Sends the MC protocol command (bulk write) from the LAN port of the CPU unit, and writes
the contents of the data registers of FP7 DT300 to DT301 to the addresses of an external
device D000100 to D000101.
• Confirms that the connection 1 is established in the master mode (X90) and transmission is
not being executed to the same port (Y90), and starts the SEND instruction.
• Specify a slot number (LAN port: U100) and a connection number (U1) with the UNITSEL
instruction.
• The SEND instruction is executed with the address of FP7 (DT300) and the number of data
(U2), the code (H5) which indicates the device type and the upper address of the destination
device, and the lower address (H64=100).
• It is possible to confirm if a transmission error occurs by the send result done flag (Y70)
when the send active flag (Y90) turns OFF.
R0
DF
Master
communication
clear to send flag
R100
SEND.US
Y90
DF/
Send result flag
Send active flag
In abnormal state: ON / In Normal state: OFF
Command message
Response message
Write specifying address with SEND instruction
X90
Y90
Master
communication
send active flag
DT300
U2
S
n
Y70
9.7 MC Protocol Master Communication (SEND)
R100
SEND
execution
relay
UNITSEL U100
U1
S1
S2
H500
H64
DT0
D1
D2
D3
R101
SET
Send result
hold relay
External Device
supporting MC protocol
D000100
100
D000101
200
・・・・・・
・・・・・・・・
・・・・・・
・・・・・・・・
SEND trigger
Clear to send flag : ON
Send active flag : OFF
Communication port settings
S1: CPU LAN port (U100)
S2: Connection 1 (U1)
SEND instruction execution
S : Beginning of send data
(DT300)
n : No. of sent data (U2)
D1: MC device type (H5)
MC upper address (H00)
D2: MC lower address (H64)
D3: Execution result code (DT0)
9-21

Advertisement

Table of Contents
loading

Table of Contents