Mc Protocol Master Communication (Recv); Reading Data From External Devices - Panasonic FP7 User Manual

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

Advertisement

9.6 MC Protocol Master Communication (RECV)

9.6.1 Reading Data From External Devices

 Procedure
The PLC has the transmission right in the master communication. The communication is
performed by sending commands to devices which support 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 read) from the LAN port of the CPU unit, and reads it
to the data registers of FP7 DT300 to DT301 from 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 RECV instruction.
• Specify a slot number (LAN port: U100) and a connection number (U1) with the UNITSEL
instruction.
• The RECV instruction is executed with the code (H500) which indicates a destination device
type and upper address, lower address (H64=100), the number of data (U2) and the storage
address of FP7 (DT300).
• 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
R100
clear to send flag
RECV.US
Y90
DF/
Send result flag
Send active flag
In abnormal state: ON / In Normal state: OFF
Command message
Response message
Read specifying address with RECV instruction
X90
Y90
Master
communication
send active flag
H500
H64
S1
S2
Y70
9.6 MC Protocol Master Communication (RECV)
R100
RECV
execution
relay
UNITSEL U100
U1
S1
S2
U2
DT300
DT0
n
D1
D2
R101
SET
Send result
hold relay
External Device
supporting MC protocol
D000100
100
D000101
200
・・・・・・
・・・・・・・・
・・・・・・
・・・・・・・・
RECV trigger
Clear to send flag : ON
Send active flag : OFF
Communication port settings
S1: CPU LAN port (U100)
S2:Connection 1 (U1)
RECV instruction execution
S1: MC device type (H5)
MC upper address (H00)
S2: MC lower address (H64=100)
n : No. of received data (U2)
D2: Data storage location (DT300)
D3: Execution result code (DT0)
9-17

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FP7 and is the answer not in the manual?

Questions and answers

Table of Contents