日本語 English

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
FrameCharacteristicsCompatible messagesSupported codes
4E3E frame + "serial number"SLMP messagesASCII/BIN
3EFor QnA series Ethernet unitsSLMP messages
QnA series Ethernet unit messages
ASCII/BIN
1EFor A series Ethernet unitsA series Ethernet unit messagesASCII/BIN
[Reference] Frames when connected via serial communication
FrameCharacteristicsCompatible messagesModel
4CMaximum access rangeFor QnA series serial communication units only (QnA extended frame)1~5
3CFor QnA series data communicationFor QnA series serial communication units only1~4
2CFor QnA series data communicationFor A series serial communication units only1~4
1CFor A series data communicationFor A series computer link units only1~4
[Reference] Formats when connected via serial communication
ModelCodeRemarks
Format 1ASCII
Format 2ASCIIBlock number added
Format 3ASCIIFormat enclosed in STX and ETX
Format 4ASCIICR LF added at the end
Format 5BINUsable 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)
SubheaderAccess routeRequest data lengthMonitoring timerRequest data
Network numberPC numberRequest destination module I/O numberRequest destination module station numberCommand
ReadSubcommandFirst deviceNumber of points
500000FFFF03000C000800010400000A0000A80100
  • 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

SubheaderAccess routeResponse data lengthEnd codeResponse data
Network numberPC numberRequest destination module I/O numberRequest destination module station number
D00000FFFF0300040000003412
  • Response data length: number of bytes from the end code to the end of the response data: 0004 (4 bytes)
  • End code: 0000
  • Response data: 1234 (hexadecimal)

Command list

Command List for 4C/3C/4E/3E Frames
CommandFunctions
0401Batch read
1401Batch write
0403Random read
1402Random write
0406Multiple block batch read
1406Multiple block batch write
0801Register monitor data
0802Monitor
041ABatch read of array labels (iQ-R series only)
141ABatch write of array labels (iQ-R series only)
041CRandom read of labels (iQ-R series only)
141BRandom write of labels (iQ-R series only)
0613Buffer memory batch read
1613Buffer memory batch write
0601Intelligent function module batch read
1601Intelligent function module batch write
1001Remote RUN
1002Remote STOP
1003Remote PAUSE
1005Remote latch clear
1006Remote RESET
0101Read CPU model name
1630Remote password unlock
1631Remote password lock
0619Loopback test
1617Clear error information
1810Read directory/file information
1811Search directory/file information
1820Create new file
1822Delete file
1824Copy file
1825Change file attributes
1826Change file creation date/time
1827Open file
1828Read file
1829Write to file
182AClose file
0601Serial communication only: read registered data
1610Serial communication only: register data
1618Serial communication only: global signal control
1615Serial communication only: initialize transmission sequence
1612Serial communication only: mode switching
0630Serial communication only: register PLC CPU monitoring
0631Serial communication only: deregister PLC CPU monitoring
2101On-demand

Device Code List

Device symbolDevice code
Q/L seriesiQ-R series
SM910091
SDA900A9
X9C009C
Y9D009D
M900090
L920092
F930093
V940094
BA000A0
DA800A8
WB400B4
TSC100C1
TCC000C0
TNC200C2
LTS0051
LTC0050
LTN0052
STSC700C7
STCC600C6
STNC800C8
LSTS0059
LSTC0058
LSTN005A
CSC400C4
CCC300C3
CNC500C5
LCS0055
LCC0054
LCN0056
SBA100A1
SWB500B5
S980098
DXA200A2
DYA300A3
ZCC00CC
LZ0062
RAF00AF
ZRB000B0

Command Explanations (Partial)

0401

Batch read

Reads consecutive devices in batch with the number of device points specified

● Reading bit devices in word units

Read 1 word from M100
CommandSubcommandFirst deviceNumber of points
01040000640000900100
Response data
Response data
3412
001101000010010
M107M100M115M108

● Reading word devices in word units

Read 3 words from D100
CommandSubcommandFirst deviceNumber of points
01040000640000A80300
Response data
Response data
34127856BC9A
D100D101D102

● Reading in bit units

Read 8 bits from M100
CommandSubcommandFirst deviceNumber of points
01040100640000900800
Response data
Response data
00101100
M100M107

1401

Batch write

Writes values to devices in word units

● Writing bit devices in word units

Write 1 word from M100
CommandSubcommandFirst deviceNumber of pointsWrite data
011400006400009001003412
0011010000010010
M107M100M115M108

There is no response data

● Writing word devices in word units

Write 3 words from D100
CommandSubcommandFirst deviceNumber of pointsWrite data
01140000640000A8030034127856BC9A
D100D101D102

There is no response data

● Writing in bit units

Write 8 bits from M100
CommandSubcommandFirst deviceNumber of pointsWrite data
0114010064000090080000110100
M100M107

There is no response data

0403

Random read

Reads values by specifying non-consecutive device numbers

● Reading in word units

Word read of D0 and M100 and double word read of D100
CommandSubcommandNumber of word pointsNumber of double word pointsWord device number 1Word device number 2Double word device number 1
030400000201000000A864000090640000A8
Response data
Response data
3412010034127856
D0M100D100D101

0801

Register monitor data

Registers the devices to monitor

● No monitoring condition specified

Word read of D0 and M100 and double word read of D100
CommandSubcommandNumber of word pointsNumber of double word pointsWord device number 1Word device number 2Double word device number 1
010800000201000000A864000090640000A8

There is no response data

0802

Register monitor data

Reads the values of the registered devices

CommandSubcommand
02080000
Response data
Response data
3412010034127856
D0M100D100D101

Related pages

TCP and UDP communication test tool

Analyze and test TCP and UDP communication

ComCom

An application that sends messages you create using Ethernet socket communication

Python MC protocol communication

MITSUBISHI MC Protocol Communication

MC protocol communication with MITSUBISHI PLCs

KEYENCE

Mitsubishi MC protocol UDP communication

Mitsubishi MC Protocol UDP Communication

A function block for MC protocol UDP communication with MITSUBISHI PLCs

OMRON

Connecting to MITSUBISHI PLCs

Connecting to MITSUBISHI PLCs

McLink library for connecting the NX series to MITSUBISHI PLCs with the MC protocol

Comments