Connecting with MC Protocol Communication (MITSUBISHI MELSEC PLCs) How to Connect with 3E Frames in Binary Code
Overview
Among the protocols of the MC protocol communication function available on the Ethernet port of MITSUBISHI MELSEC PLCs, this explains communication with 3E frames in binary code.
When a MELSEC PLC receives an MC protocol command, it returns the data corresponding to the command, so no ladder program is needed.
MC protocol communication over the Ethernet port can use both TCP/IP and UDP/IP.
What Is the MC Protocol?
A protocol used in serial and Ethernet communication in which a PC or host device sends MC protocol commands to a MELSEC PLC to read and write devices (relays and data memory), change modes and more, without a ladder program on the PLC.
Types of Frames (Messages)
The MC protocol access range when connected from an external device via Ethernet is as follows
Types of MC protocol Ethernet frames
Frame
Characteristics
Compatible messages
Supported codes
4E
3E frame + "serial number"
SLMP messages
ASCII/BIN
3E
For QnA series Ethernet units
SLMP messages QnA series Ethernet unit messages
ASCII/BIN
1E
For A series Ethernet units
A series Ethernet unit messages
ASCII/BIN
[Reference] Frames when connected via serial communication
Frame
Characteristics
Compatible messages
Model
4C
Maximum access range
For QnA series serial communication units only (QnA extended frame)
1~5
3C
For QnA series data communication
For QnA series serial communication units only
1~4
2C
For QnA series data communication
For A series serial communication units only
1~4
1C
For A series data communication
For A series computer link units only
1~4
[Reference] Formats when connected via serial communication
Model
Code
Remarks
Format 1
ASCII
Format 2
ASCII
Block number added
Format 3
ASCII
Format enclosed in STX and ETX
Format 4
ASCII
CR LF added at the end
Format 5
BIN
Usable with 4C frames only
3E Frame Binary Code Messages
Excluding the Ethernet TCP/UDP header
Request message
Example of reading the value of DM10 of the connected station (own station)
Subheader
Access route
Request data length
Monitoring timer
Request data
Network number
PC number
Request destination module I/O number
Request destination module station number
Command
Read
Subcommand
First device
Number of points
50
00
00
FF
FF
03
00
0C
00
08
00
01
04
00
00
0A
00
00
A8
01
00
Request data length: number of bytes from the monitoring timer to the end of the request data: 000C (12 bytes)
Monitoring timer: 0.25 s × setting (0001H to 0028H recommended): 0008 = 0.25 × 8 = 2 s
Read command: 0401
Subcommand: 0000
First device: A800000A: A8 = DM, 00000A = 10
Number of points: 0001: 1
Response message
Subheader
Access route
Response data length
End code
Response data
Network number
PC number
Request destination module I/O number
Request destination module station number
D0
00
00
FF
FF
03
00
04
00
00
00
34
12
Response data length: number of bytes from the end code to the end of the response data: 0004 (4 bytes)