PortDock

MC protocol device numbers — hex X/Y, D/W/ZR, and the octal mix-up

MC protocol (SLMP) X, Y, B, W and ZR use hex numbers; D, M and R use decimal. How numbers look in binary and ASCII frames, 16-point words and 32-bit values.

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

An MC protocol (SLMP) request names a device as «device code + number», but the number base depends on the device. X, Y, B, W and ZR are numbered in hexadecimal; M, L, F, SM, D, R, SD and the timers and counters in decimal. Miss this and values are read from the wrong place, or you get C050 or C056.

How the same «100» goes into a frame

NotationNumber (decimal)Binary number, 3 bytesASCII code + 6-digit number
D10010064 00 00D*000100
W10025600 01 00W*000100
X1F311F 00 00X*00001F
X203220 00 00X*000020
ZR101610 00 00ZR000010

ASCII writes the number in the device's own base — «000100» is number 100 for D but 256 for W. Binary sends the number's value as 3 bytes (low byte first), so D100 is 64 00 00 and W100 is 00 01 00. A–F in the number of a decimal device makes PortDock PLC Simulator answer C050. Leading zeros in an ASCII number may also be spaces («D 7»).

Counting X/Y in decimal or octal

Bit devices read as words — 16 points

Reading a bit device with subcommand 0000 (word units) packs 16 points into one word, with the lowest number as bit 0. One word from X20 is X20–X2F; one word from M100 is M100–M115 — M is decimal, so the end number works out differently. Two words bring 32 points, which easily runs past the end of a device near its last number (C056).

32-bit values — the lower-numbered word is the low part

A 32-bit value in D200 and D201 keeps the low 16 bits in D200 and the high 16 bits in D201. A random read (0403) double-word point D1500 reads D1500–D1501, and the binary reply «4E 4F 54 4C» is 0x4C544F4E. In Modbus word-order terms that is CDAB, which is also the default order in PortDock PLC Simulator's «Cell settings».

Timers and counters

Timers split into TS (contact), TC (coil) and TN (current value); counters into CS, CC and CN. Contacts and coils are bit devices and current values are word devices, so reading TN or CN in bit units gives C05B.

Device codes (the 18 PortDock PLC Simulator handles)

DeviceBinary codeASCII codeNumberingType
X input9CX*hexbit
Y output9DY*hexbit
M internal relay90M*decimalbit
L latch relay92L*decimalbit
F annunciator93F*decimalbit
B link relayA0B*hexbit
SM special relay91SMdecimalbit
D data registerA8D*decimalword
W link registerB4W*hexword
R file registerAFR*decimalword
ZR file register (serial numbers)B0ZRhexword
SD special registerA9SDdecimalword
TS/TC/TN timer contact, coil, current valueC1/C0/C2TS/TC/TNdecimalbit/bit/word
CS/CC/CN counter contact, coil, current valueC4/C3/C5CS/CC/CNdecimalbit/bit/word

With subcommands 0002/0003 the binary code takes 2 bytes (e.g. A8 00), the ASCII code 4 characters (e.g. «D***») and the number 8 digits. Devices not in the table (long timers, index registers …) get C05B from PortDock PLC Simulator. Number ranges per device depend on the model; see your PLC's manual.

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