DeterministicESPAsyncWebServer v6.27.1
Zero-allocation, bounded-execution async HTTP server for ESP32
Loading...
Searching...
No Matches
melsec.h File Reference

Mitsubishi MELSEC MC protocol (binary 3E frame) codec (DETWS_ENABLE_MELSEC) - zero-heap batch-read request builder + response parser for MELSEC PLCs over TCP/UDP. More...

#include "ServerConfig.h"

Go to the source code of this file.

Detailed Description

Mitsubishi MELSEC MC protocol (binary 3E frame) codec (DETWS_ENABLE_MELSEC) - zero-heap batch-read request builder + response parser for MELSEC PLCs over TCP/UDP.

The QnA-compatible binary 3E request frame (all multi-octet fields LITTLE-endian, unlike the big-endian PLC protocols):

50 00 subheader (request)
00 network number
FF PC (station) number
FF 03 request destination module I/O number (0x03FF)
00 request destination multidrop station
LL LL request data length (the octets from the monitoring timer on)
TT TT monitoring timer
01 04 command (0x0401 batch read)
00 00 subcommand (0x0000 word units)
dd dd dd head device number (3 octets)
CC device code (D = 0xA8, M = 0x90, ...)
pp pp number of device points

The response subheader is D0 00, followed by the same routing, a 2-octet length, a 2-octet end code (0x0000 = success), then the read data (2 octets per word point).

Frame layout + device codes verified against a third-party MC-protocol implementation. This is the codec; the TCP/UDP send is the application's.

Author
Douglas Quigg (dstroy0)
Date
2026

Definition in file melsec.h.