Mitsubishi MELSEC protocol

Mitsubishi MELSEC protocol

Mitsubishi MELSEC protocol (MELSEC Communication Protocol)

Protocol description


The Mitsubishi MELSEC protocol is used for communication with Mitsubishi PLCs (MELSEC L-series, MELSEC Q-series, and MELSEC iFX-series) equipped with Ethernet communication modules. The UDP variant using the UDP protocol (on the TCP/IP-UDP line) and the TCP variant using the TCP protocol (on the TCP/IP-TCP line) are implemented. Read and write commands are supported.

The following rame formats are supported (see Frame type protocol parameter): 1E, 3E, 4E. Both binary and ASCII message encoding are supported (see the Code type protocol parameter). ASCII-encoded messages are approximately 2 times longer than binary-encoded messages.

Reading and writing various types of objects (device codes) is supported. These objects are bit-oriented or word-oriented, and the interpretation of several (16 or 32) consecutive bit objects as a signed/unsigned number or two consecutive word objects as a number (unsigned, signed, a real 32-bit number) is supported. Access to a specific bit of a word object is also supported.

Communication was tested against the Mitsubishi FX5UC-32MT/DSS-T model (frame 3E, binary encoding, TCP communication).

Communication line configuration


  • Communication line category: TCP/IP-UDP (UDP variant) or  TCP/IP-TCP (TCP variant).

  • TCP/IP-UDP parameters:

    • Host: IP address or of the network interface that is used for communication by the KOM process. A symbolic name that can be translated to an IP address can be entered too.
      Note: a symbolic name ALL or can be entered - in which case all available interfaces are used.

    • Port: UDP port number that is used for communication by the KOM process.

    • Note: The parameters of the backup server (Host and Port) are not used in this protocol.

  • TCP/IP-TCP parameters:

    • As the Host, Port, and Line Number parameters are not used (the PLC address is configured on the station), arbitrary values can be specified.


Station configuration


  • The communication station corresponds to the device with which the KOM process communicates.

  • Communication protocol "Mitsubishi MELSEC".

  • IP Address: IP address of the Mitsubishi device with which the KOM process communicates directly via the Ethernet network. This can be the target device or an intermediary if the target PLC is in another network. If it is an intermediary, the destination device is specified using the station protocol parameters Station No., Network No.Request destination module I/O No., Request destination module station No.

  • Port: TCP/UDP port number of the Mitsubishi device

Station protocol parameters

Configuration dialog box - tab Parameter.
They influence some optional parameters of the protocol. The following station protocol parameters can be set:

Table 1

Parameter

Meaning

Unit

Default value

Parameter

Meaning

Unit

Default value

General Parameters

Code type

Type of message encoding:

  • Binary code - messages are binary encoded, they are smaller and more compact

  • ASCII code - messages are text-encoded, they are larger but more visually readable

-

Binary code

Frame type

The type of frame (header) used. This type must be the same as the type configured on the Mitsubishi PLC side

  • 1E - the simplest header, without a data length specification

  • 3E - header with a data length specification

  • 4E - header with a specification of data length and a serial identifier of individual messages

-

3E

1E/3E/4E Frames Common Parameters

Station No. (PC No.)

Hexadecimal number (00-FF) specifying the station network module number (for remote stations). Keep the default value FF for directly connected PLCs.

-

FF

Monitoring Timer

Specification of the time to wait for a response in 250 ms units, which is sent in the message header (a value of 0 means waiting without restriction). The default value of 16 means waiting for 4 seconds.

250 ms

16

Max Points

The maximum number of objects read in one message. The range is 1-960. Objects can be of bit or word type. A bit object is transmitted as 1 bit (2 bits in ASCII encoding), a word object is transmitted as 2 bytes (4 bytes in ASCII encoding).
When reading objects periodically, read requests are split into multiple if the number of objects in one request is greater than the specified maximum.

-

480

Max Data Bytes

Maximum response size - the size of the pure data. The range is 2-8192 bytes.
When reading objects periodically, the read requests are split into several if the response size is larger than the specified maximum.

byte

512

3E/4E Access Route Parameters

Network No.

Destination network number (for multidrop systems/stations on remote networks). The value is entered in decimal and is in the range 0-255. When communicating with a directly connected station, the value 0 is entered. Other values (see documentation) are entered when communicating with stations located on other network segments (it can also be serial lines) located behind the directly connected station. See Literature for more information.

-

0

Request destination module I/O No.

Target I / O module number (for multidrop/multiCPU/redundant systems). The value is entered in hexadecimal and is in the range 0000-FFFF. When communicating with a directly connected station, the value 03FF is entered. Other values (see documentation) are entered when communicating with stations located on other network segments (it can also be serial lines) located behind a directly connected station, in the case of multidrop connections, and in the case of working with redundant PLCs and PLCs with multiple CPUs. See Literature for more information.

-

03FF

Request destination module station No.

Destination station number (for multidrop/multiCPU/redundant systems). The value is entered in hexadecimal and is in the range 00-FF. When communicating with a directly connected station, the value 00 is entered. Other values (see documentation) are entered in the case of a multidrop connection. See Literature for more information.

-

00

Other Parameters


Retry Count

Maximum count of request retries. If no response returns after a request has been sent, the station's status will change to a communication error.

-

2

Retry Timeout

Timeout before resending a request if no response has been received.

s

0.1

Wait Timeout

Timeout for receiving a response. The value of the parameter should be greater than the time corresponding to the value of the Monitoring Timer parameter.

s

1.0

Full Debug

Logging of detailed debug information about communication in the line log.

YES/NO

NO

Text Debug

Text reports of messages. If Code type=ASCII code, message listings will be in text form.

YES/NO

NO