PortDock

MC protocol end codes (C050–C061): what to check, in order

What to check when an MC protocol (SLMP) end code is not 0000: where the end code and error information sit, and what to fix in the request for C050–C061.

Tools for this guidePLC Simulator Windows program · freeMC Protocol (SLMP) Frame Decoder web · no install

An MC protocol (SLMP) reply with end code 0000 means completed; anything else is an error, and instead of values the reply carries «error information». This guide gives the order to check things in when that happens, and what to fix in the request for each of the C050–C061 codes PortDock PLC Simulator uses.

1. Did a reply arrive at all?

No reply is not an end code problem. Check the connection (address, port, firewall), whether the frame (3E/4E) and data code (binary/ASCII) match the receiver, and the monitoring timer and client timeout. PortDock PLC Simulator does not answer frames in another format; it only logs an «IGNORED» line.

2. Read the end code

FormatEnd code positionC059 looks like
3E binarybytes 10–11 (low byte first)59 C0
4E binarybytes 14–1559 C0
3E ASCIIcharacters 19–22C059
4E ASCIIcharacters 27–30C059

In binary, «59 C0» reads backwards as C059. Look it up as «59C0» and you will not find it in the manual.

3. Use the error information to find the request

The 9 bytes (18 ASCII characters) after the end code are the request's network No., PC No., I/O No., station No., command and subcommand. «… 0B 00 59 C0 00 FF FF 03 00 01 01 00 00» says a request with command 0101 and subcommand 0000 was refused with C059. A program sending several requests matches replies with these fields (and the serial number in 4E).

4. What to check for each code

CodeMeaningCheck in the request
C050ASCII conversion errorNon-hex characters in ASCII code, or A–F in the number of a decimal device (D, M …)
C051Points out of range (words)Batch read/write word points are 0 or above 960 — split the read
C052Points out of range (bits)Bit points are 0 or above 7168 (binary) / 3584 (ASCII)
C053Random points out of range (bits)1402 bit points are 0 or above 188 (94 for subcommand 0003)
C054Random points out of range (words)0403: word + double-word points are 0 or above 192 (96 for 0002); 1402: words×12 + double words×14 above 1920 (960 for 0002)
C056Address out of rangeA number beyond the device size. Reading a bit device in word units takes 16 points per word, so the end number grows fast. Were X/Y numbers sent in hex?
C057Request length mismatchHeader request data length = bytes (characters in ASCII) from the monitoring timer to the end
C059Wrong command/subcommandCommand and subcommand values and byte order (binary 0401 is 01 04). Does the receiver support the command?
C05BDevice cannot be accessedA typo in the device code, or a word device (D …) requested in bit units (subcommand 0001)
C05CRequest data errorIn PortDock PLC Simulator: loopback data count outside 1–960 (from 0.6.0 also a wrong mode value in a remote operation)
C05DMonitor not registeredWas Entry Monitor Device (0801) sent first? PortDock PLC Simulator from 0.6.0
C05FWrong access destinationStation fields (network, PC, I/O, station). PortDock PLC Simulator only uses it with «Own station requests only» on
C060Bit request errorA bit write value other than 0/1 — in binary bit writes each point is 4 bits («11 00» = ON ON OFF OFF)
C061Data length mismatchThe number of write values does not match the point count, or bytes are left over after the command data

Meanings are shortened from MELSEC iQ-R Ethernet User's Manual (Application) SH-081257ENG 3.5 «List of Error Codes»; «Check in the request» lists the conditions under which PortDock PLC Simulator returns each code. A real PLC or communication module may return a different code for the same mistake. For codes not in this table, see the error code list in that PLC's or module's manual.

5. Test your error handling in advance

Paste a reply into the web tool «MC Protocol (SLMP) Frame Decoder» to see the end code and error information field by field. Paste a request and it shows which end code PortDock PLC Simulator would return.

This guide is based on Mitsubishi Electric's public manuals (SLMP and MC protocol); it is not affiliated with Mitsubishi Electric.

Sources

Published 2026-10-29