MC Read
x/mcRead component: v0.37.0+ Reads Q/L/R/iQ-R/iQ-F series PLC devices via the Mitsubishi MC protocol (3E frame/binary, SLMP). Results are written to msg.Data as a unified iot_points.Data list.
Requires: rulego-components-iot (opens new window)
# Configuration
| Field | Type | Description | Default |
|---|---|---|---|
| server | string | PLC address host:port, MC default port 6000 | 127.0.0.1:6000 |
| timeout | int | Request timeout (seconds) | 5 |
| points | array | Default point table. Points in msg.Data take precedence | - |
Network/PC number parameters are fixed by the underlying library (Ethernet direct-connect scenario).
# Point Table Fields
| Field | Description |
|---|---|
| name | Point name |
| addr | Device address (see below) |
| type | Data type |
| scale / offset | Engineering conversion |
| endian | Multi-register byte order: ABCD/CDAB/BADC/DCBA |
Engineering formula: eng = raw * scale + offset. For offset-only conversion, set scale=1 explicitly; when scale=0, the result becomes offset.
All fields support ${msg.xx} / ${metadata.xx} templates.
# Address Format (Devices)
| Device | Word | Bit | Description |
|---|---|---|---|
| D | D100 | - | Data register |
| W | W200 | - | Link register |
| R | R200 | - | File register |
| ZR | ZR300 | - | File register (extended) |
| M | - | M10 | Internal relay |
| SM | - | SM400 | Special relay |
| X | - | X1A0 | Input (hex) |
| Y | - | Y30 | Output (hex) |
| B | - | B4 | Link relay |
| C | C10 | C10 | Counter |
| L | - | L10 | Latched relay |
# Data Types
BOOL, INT16, UINT16, INT32, UINT32, FLOAT32, FLOAT64 (per-point Endian: ABCD/CDAB/BADC/DCBA)
# Input/Output
- Input: use configured
points, or override them by passing a point list inmsg.Data - Output:
[{"name","value","timestamp","error"}]
# Example
{
"id": "mc_read",
"type": "x/mcRead",
"configuration": {
"server": "192.168.1.30:6000",
"points": [
{"name": "speed", "addr": "D100", "type": "UINT16"},
{"name": "temperature", "addr": "D102", "type": "FLOAT32"}
]
}
}
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
# Related
- Overview: x/mc
- Write: x/mcWrite
- Universal acquisition entry: x/iotRead (driver=mc)
- To time-series storage: x/tsdbWrite (measurement configured)
Edit this page on GitHub (opens new window)
Last Updated: 2026/08/01, 05:05:14