7 Communication Using MC Protocol
51
FX3U-ENET-ADP User's Manual
1
Introduction
2
Specification
3
System
Configuration
4
Installation
5
Wiring
6
Introduction of
Functions
7
Communication
Using
MC Protocol
8
The Operation
of GX Works2
9
Troubleshooting
A
List of Special
Devices
7.3 Message Formats and Control Procedures
2) When an external device writes data to the PLC
a) Area C indicates transmission from the external device to the PLC.
b) The program of the external device is generated so that the data is transmitted sequentially from left to
right. (For example: in case of area C, data should be sequentially sent starting from the header.)
When the PLC receives a command message from an external device, it completes processing of the data in
area A/C, then sends a response message and waits for the next command message (neutral state).
7.3.2 Message format and control procedure
This section explains the message format and control procedure.
1) Message format
This section explains the message format for transmission between the Ethernet adapter and an external
device.
The communication data consists of "header" and "application data" as shown below.
a) Header
The header for TCP/IP or UDP/IP is used. The user does not need to specify it; the Ethernet adapter
attaches it.
b) Application data
The application data is largely divided into "subheader" and "text" as shown below.
- The subheader represents command/response and the setting value is predetermined.
- The text contains the request data (command) and response data (response) for each function and
this data is determined by the prescribed format (for a more detailed description, refer to Section 7.5
and later).
c) Format in the application data field
- Communication in ASCII code
- Communication in binary code
External
device side
(Command message)
PLC side
Header
Subheader
PC No.
Monitoring
timer
Area C
Header
Subheader
Complete code
(Response message)
Header
Application data
Application data
External
device
side
PLC side
Subheader Text (command)
2 bytes
Differs depending
on function
2 bytes
Differs depending on
function and
normal/abnormal
completion
Subheader
Text (response)
Application data
Application data
External
device
side
Subheader
Text (command)
1 byte
Differs depending
on function
PLC side
1 byte
Differs depending on
function and
normal/abnormal
completion
Subheader
Text (response)
Application data