@fa_yoshinobu/node-red-contrib-plc-comm-slmp 0.2.1 → 0.2.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +76 -9
- package/README.md +216 -283
- package/docsrc/assets/README.md +10 -10
- package/docsrc/index.md +11 -11
- package/docsrc/user/GETTING_STARTED.md +99 -0
- package/docsrc/user/LATEST_COMMUNICATION_VERIFICATION.md +35 -0
- package/docsrc/user/SUPPORTED_REGISTERS.md +101 -0
- package/docsrc/user/USER_GUIDE.md +264 -227
- package/docsrc/user/toc.yml +8 -2
- package/examples/flows/README.md +40 -23
- package/examples/flows/slmp-array-string.json +194 -185
- package/examples/flows/slmp-basic-read-write.json +194 -185
- package/examples/flows/slmp-control-error.json +216 -211
- package/examples/flows/slmp-demo.json +269 -260
- package/examples/flows/slmp-device-matrix.json +571 -513
- package/examples/flows/slmp-routing.json +123 -118
- package/examples/flows/slmp-udp-read-write.json +194 -185
- package/lib/index.js +6 -6
- package/lib/slmp/client.js +1513 -642
- package/lib/slmp/constants.js +139 -121
- package/lib/slmp/core.js +564 -406
- package/lib/slmp/errors.js +21 -21
- package/lib/slmp/high-level.js +1084 -911
- package/lib/slmp/index.js +9 -10
- package/nodes/slmp-connection.html +141 -142
- package/nodes/slmp-connection.js +83 -78
- package/nodes/slmp-read.html +431 -274
- package/nodes/slmp-read.js +251 -207
- package/nodes/slmp-write.html +423 -267
- package/nodes/slmp-write.js +323 -275
- package/package.json +54 -53
- package/docsrc/maintainer/ARCHITECTURE.md +0 -36
- package/docsrc/validation/reports/README.md +0 -15
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,80 @@
|
|
|
1
|
-
# Changelog
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## Unreleased
|
|
2
4
|
|
|
3
|
-
## 0.2.
|
|
5
|
+
## 0.2.12 - 2026-05-02
|
|
4
6
|
|
|
5
|
-
-
|
|
6
|
-
- refresh README and
|
|
7
|
+
- bump the release revision for npm and Node-RED Flow Library publishing; the Flow Library currently shows `0.2.3` as the public baseline
|
|
8
|
+
- refresh README, user-guide, latest-verification, and example-flow docs with compatibility notes from the published Flow Library version
|
|
9
|
+
- document the public compatibility change from separate `PLC series` / `frame type` fields to one `PLC type` selector
|
|
10
|
+
- document the public device-scope changes since Flow Library `0.2.3`: `LTS`, `LTC`, `LSTS`, `LSTC`, `LCS`, `LCC`, and `LZ` are now in the high-level surface where the selected PLC type supports them
|
|
11
|
+
- document the current device-matrix flow behavior: one-click run-all read/write buttons, status-lamp feedback, JSONL result logging, `plcFamily` records, and skip/error summary counts
|
|
7
12
|
|
|
8
|
-
## 0.2.
|
|
13
|
+
## 0.2.11 - 2026-05-02
|
|
9
14
|
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
|
|
15
|
+
- remove the interim device-range catalog helper from the Node-RED package
|
|
16
|
+
- keep ordinary Node-RED read/write validation to address format and protocol constraints, leaving actual device-range errors to the PLC response
|
|
17
|
+
- reject device codes that the selected `plcFamily` does not expose in the public high-level table, aligned with the .NET `DEVICE_RANGES.md` support matrix
|
|
18
|
+
|
|
19
|
+
- remove stale user-guide and TODO wording that still described `LCS` and `LCC`
|
|
20
|
+
as future support; the high-level helpers route reads through direct bit read
|
|
21
|
+
and writes through random bit write (`0x1402`)
|
|
22
|
+
- keep `G` and `HG` out of the default public device-matrix flow while they
|
|
23
|
+
remain routed-device follow-up items
|
|
24
|
+
|
|
25
|
+
## 0.2.10 - 2026-04-27
|
|
26
|
+
|
|
27
|
+
- tighten SLMP device-name parsing to split by known device code instead of a greedy letter regex, so hexadecimal addresses such as `XFF` and `SWFF` parse correctly
|
|
28
|
+
- fail matched-device invalid numbers as that device code instead of treating them as a different unknown code shape
|
|
29
|
+
|
|
30
|
+
## 0.2.9 - 2026-04-27
|
|
31
|
+
|
|
32
|
+
- add packaged helper support for remote control, memory read/write, extend-unit read/write, and label array/random read/write commands
|
|
33
|
+
- add low-level tests for the new helper payloads and response parsing
|
|
34
|
+
- expand Node-RED wrapper participation in the shared cross-library parity suite
|
|
35
|
+
|
|
36
|
+
## 0.2.8 - 2026-04-27
|
|
37
|
+
|
|
38
|
+
- tighten long-device route guards so `LTN/LSTN/LCN/LZ` avoid unsupported direct/raw word and dword paths, while supported random/named dword paths remain available
|
|
39
|
+
- align `LCS/LCC` writes with the random/named bit route policy
|
|
40
|
+
|
|
41
|
+
## 0.2.7 - 2026-04-14
|
|
42
|
+
|
|
43
|
+
- require explicit `plcFamily` on the standard packaged client and connection-node route, while keeping manual frame/profile selection only for internal diagnostic paths
|
|
44
|
+
- switch the standard device-range example to the interim catalog helper so the high-level Node surface consistently derives frame, profile, address, and range handling from one family selection
|
|
45
|
+
|
|
46
|
+
## 0.2.6 - 2026-04-14
|
|
47
|
+
|
|
48
|
+
- replace connection-node `plcSeries` / `frameType` selection with one explicit `plcFamily` that derives the fixed frame, access profile, address-family, and range-family defaults
|
|
49
|
+
- make high-level `X/Y` string addresses require explicit `plcFamily`, treat `iq-f` `X/Y` as octal, and refresh tests, docs, and example flows for the stricter family-driven model
|
|
50
|
+
|
|
51
|
+
## 0.2.5 - 2026-04-14
|
|
52
|
+
|
|
53
|
+
- add interim device-range catalog helpers and CPU operation-state support to the packaged SLMP client surface
|
|
54
|
+
- add regression tests and README coverage for the new device-range and CPU-state helpers
|
|
55
|
+
|
|
56
|
+
## 0.2.4 - 2026-04-13
|
|
57
|
+
|
|
58
|
+
- add client-side guard logic for unsupported long-timer direct reads and unsupported `LCS/LCC` random, block, and monitor-registration commands
|
|
59
|
+
- align long-counter helper behavior and core tests with the shared cross-library consistency rules
|
|
60
|
+
|
|
61
|
+
## 0.2.3 - 2026-04-13
|
|
62
|
+
|
|
63
|
+
- CI now checks out `plc-comm-slmp-cross-verify/specs/shared` before running the shared-vector tests, so the Node package validates against the canonical cross-library parity vectors.
|
|
64
|
+
|
|
65
|
+
## 0.2.2 - 2026-04-01
|
|
66
|
+
|
|
67
|
+
- add an optional `npm run smoke:editor` script that installs the local package into an isolated userDir, starts a temporary Node-RED runtime, imports `slmp-basic-read-write.json`, and verifies the flow starts cleanly
|
|
68
|
+
- refresh README, user guide, and example-flow docs with the editor-smoke command and the current canonical-address helper exports
|
|
69
|
+
|
|
70
|
+
## 0.2.1 - 2026-03-28
|
|
71
|
+
|
|
72
|
+
- move npm package publishing to the scoped name `@fa_yoshinobu/node-red-contrib-plc-comm-slmp`
|
|
73
|
+
- refresh README and user documentation for Flow Library submission, npm badges, and scoped install commands
|
|
74
|
+
|
|
75
|
+
## 0.2.0 - 2026-03-28
|
|
76
|
+
|
|
77
|
+
- add `slmp-connection`, `slmp-read`, and `slmp-write` nodes for binary 3E/4E over TCP and UDP
|
|
78
|
+
- add named address helpers including `,count`, string access, route overrides, and connection control messages
|
|
79
|
+
- add editor validation, example flows, README improvements, and user/maintainer documentation
|
|
80
|
+
- add local test coverage and package dry-run validation
|
package/README.md
CHANGED
|
@@ -1,295 +1,228 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
[
|
|
13
|
-
|
|
14
|
-
Node-RED nodes for Mitsubishi PLC communication over SLMP binary 3E/4E frames.
|
|
15
|
-
|
|
16
|
-
This package uses the same named-device foundation as the SLMP libraries, extended here with Node-RED-friendly count and string forms:
|
|
17
|
-
|
|
18
|
-
- `D100`
|
|
19
|
-
- `D100,10`
|
|
20
|
-
- `D200:F`
|
|
21
|
-
- `D200:F,4`
|
|
22
|
-
- `D300:L`
|
|
23
|
-
- `D50.3`
|
|
24
|
-
- `M1000`
|
|
25
|
-
- `M1000,8`
|
|
26
|
-
- `D100:STR,10`
|
|
27
|
-
- `DSTR100,10`
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
1
|
+
[](https://github.com/fa-yoshinobu/node-red-contrib-plc-comm-slmp/actions/workflows/ci.yml)
|
|
2
|
+
[](https://www.npmjs.com/package/@fa_yoshinobu/node-red-contrib-plc-comm-slmp)
|
|
3
|
+
[](https://www.npmjs.com/package/@fa_yoshinobu/node-red-contrib-plc-comm-slmp)
|
|
4
|
+

|
|
5
|
+

|
|
6
|
+

|
|
7
|
+

|
|
8
|
+

|
|
9
|
+
|
|
10
|
+
# Node-RED SLMP Nodes for Mitsubishi PLCs
|
|
11
|
+
|
|
12
|
+

|
|
13
|
+
|
|
14
|
+
Node-RED nodes for Mitsubishi PLC communication over SLMP binary 3E/4E frames.
|
|
15
|
+
|
|
16
|
+
This package uses the same named-device foundation as the SLMP libraries, extended here with Node-RED-friendly count and string forms:
|
|
17
|
+
|
|
18
|
+
- `D100`
|
|
19
|
+
- `D100,10`
|
|
20
|
+
- `D200:F`
|
|
21
|
+
- `D200:F,4`
|
|
22
|
+
- `D300:L`
|
|
23
|
+
- `D50.3`
|
|
24
|
+
- `M1000`
|
|
25
|
+
- `M1000,8`
|
|
26
|
+
- `D100:STR,10`
|
|
27
|
+
- `DSTR100,10`
|
|
28
|
+
|
|
29
|
+
This package is documented for the high-level Node-RED workflow only:
|
|
30
|
+
|
|
31
|
+
- `slmp-connection`
|
|
32
|
+
- `slmp-read`
|
|
33
|
+
- `slmp-write`
|
|
34
|
+
|
|
35
|
+
## Quick Start
|
|
36
|
+
|
|
37
|
+
1. Install the package into your Node-RED user directory and restart Node-RED.
|
|
38
|
+
2. Add one `slmp-connection` config node and set `host`, `port`, `transport`, and `PLC type`.
|
|
39
|
+
3. Add `slmp-read` for the first smoke test, using a safe address such as `D300`, `D300,4`, or `DSTR320,10`.
|
|
40
|
+
4. When read works, add `slmp-write` and use known-safe test devices before moving to production addresses.
|
|
41
|
+
|
|
42
|
+
If you are working from this repository, import one of the ready-to-run flows under [examples/flows](https://github.com/fa-yoshinobu/node-red-contrib-plc-comm-slmp/blob/main/examples/flows/README.md) first. The safest first choices are:
|
|
43
|
+
|
|
44
|
+
- [`slmp-basic-read-write.json`](https://github.com/fa-yoshinobu/node-red-contrib-plc-comm-slmp/blob/main/examples/flows/slmp-basic-read-write.json) for plain TCP scalar read/write
|
|
45
|
+
- [`slmp-array-string.json`](https://github.com/fa-yoshinobu/node-red-contrib-plc-comm-slmp/blob/main/examples/flows/slmp-array-string.json) for `,count` and string access
|
|
46
|
+
- [`slmp-device-matrix.json`](https://github.com/fa-yoshinobu/node-red-contrib-plc-comm-slmp/blob/main/examples/flows/slmp-device-matrix.json) for one-by-one and run-all high-level coverage across the matrix catalog
|
|
47
|
+
- [`slmp-udp-read-write.json`](https://github.com/fa-yoshinobu/node-red-contrib-plc-comm-slmp/blob/main/examples/flows/slmp-udp-read-write.json) for UDP validation
|
|
48
|
+
|
|
49
|
+
Start with `D` word devices for the first smoke test. Do not start with `slmp-device-matrix.json`.
|
|
50
|
+
|
|
51
|
+
## Release Information
|
|
52
|
+
|
|
45
53
|
- package name: `@fa_yoshinobu/node-red-contrib-plc-comm-slmp`
|
|
46
|
-
- package version: `0.2.
|
|
54
|
+
- package version: `0.2.12`
|
|
47
55
|
- npm package: <https://www.npmjs.com/package/@fa_yoshinobu/node-red-contrib-plc-comm-slmp>
|
|
48
56
|
- Node-RED requirement: `>=3.0.0`
|
|
49
57
|
- Node.js requirement: `>=18`
|
|
50
58
|
- changelog: <https://github.com/fa-yoshinobu/node-red-contrib-plc-comm-slmp/blob/main/CHANGELOG.md>
|
|
51
|
-
|
|
52
|
-
Install from npm:
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
cd ~/.node-red
|
|
56
|
-
npm install @fa_yoshinobu/node-red-contrib-plc-comm-slmp
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Install from this repository:
|
|
60
|
-
|
|
61
|
-
```bash
|
|
62
|
-
cd ~/.node-red
|
|
63
|
-
npm install /path/to/node-red-contrib-plc-comm-slmp
|
|
64
|
-
```
|
|
65
|
-
|
|
59
|
+
|
|
60
|
+
Install from npm:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
cd ~/.node-red
|
|
64
|
+
npm install @fa_yoshinobu/node-red-contrib-plc-comm-slmp
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
Install from this repository:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
cd ~/.node-red
|
|
71
|
+
npm install /path/to/node-red-contrib-plc-comm-slmp
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Optional local editor smoke test from the repository root:
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
npm run smoke:editor
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
This command installs the local package into an isolated temporary userDir, starts a temporary Node-RED runtime, imports `slmp-basic-read-write.json`, verifies the flow starts, and then shuts the runtime down again.
|
|
81
|
+
|
|
66
82
|
Legacy note:
|
|
67
83
|
|
|
68
84
|
- the original unscoped `node-red-contrib-plc-comm-slmp@0.2.0` remains on npm, but new releases move to the scoped package name above
|
|
69
85
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
-
|
|
73
|
-
|
|
74
|
-
-
|
|
75
|
-
-
|
|
76
|
-
-
|
|
77
|
-
-
|
|
78
|
-
|
|
79
|
-
##
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
-
|
|
84
|
-
- `
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
-
|
|
94
|
-
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
- `
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
- `
|
|
120
|
-
- `
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
- `
|
|
125
|
-
-
|
|
126
|
-
-
|
|
127
|
-
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
-
|
|
156
|
-
- `
|
|
157
|
-
|
|
158
|
-
- `
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
-
|
|
178
|
-
-
|
|
179
|
-
- `
|
|
180
|
-
- `LTN`, `LSTN`, and `LCN` use high-level 32-bit current values by default
|
|
181
|
-
- when you send multiple addresses as a string, newline-separated input is the clearest form
|
|
182
|
-
- per-request routing can be supplied as `msg.target`, `msg.slmp.target`, or a configured route source
|
|
183
|
-
- metadata mode can keep full `msg.slmp`, emit only `target` plus `itemCount`, or leave `msg.slmp` unchanged
|
|
184
|
-
- read errors can throw, attach to `msg.error`, or go to a second output
|
|
185
|
-
- output can be object, array, or single value when one address is requested
|
|
186
|
-
- send `msg.connect`, `msg.disconnect`, or `msg.reinitialize` as `true`, or use `msg.topic`, to control the shared connection
|
|
187
|
-
|
|
188
|
-
### `slmp-write`
|
|
189
|
-
|
|
190
|
-
Writes one or more addresses.
|
|
191
|
-
|
|
192
|
-
Preferred dynamic input:
|
|
193
|
-
|
|
194
|
-
```json
|
|
195
|
-
{
|
|
196
|
-
"D100": 42,
|
|
197
|
-
"D100,3": [10, 11, 12],
|
|
198
|
-
"D200:F": 3.14,
|
|
199
|
-
"D200:F,2": [1.25, -2.5],
|
|
200
|
-
"D50.3": true,
|
|
201
|
-
"D100:STR,10": "HELLO"
|
|
202
|
-
}
|
|
203
|
-
```
|
|
204
|
-
|
|
205
|
-
Accepted sources:
|
|
206
|
-
|
|
207
|
-
- `msg.updates`
|
|
208
|
-
- `msg.payload`
|
|
209
|
-
- `msg.address` + optional `msg.dtype` + `msg.value`
|
|
210
|
-
- static JSON or `address=value` lines in the editor
|
|
211
|
-
- configured `msg` / `flow` / `global` / `env` sources
|
|
212
|
-
|
|
213
|
-
Write errors can throw, attach to `msg.error`, or go to a second output.
|
|
214
|
-
Send `msg.connect`, `msg.disconnect`, or `msg.reinitialize` to control the shared connection from the write node too.
|
|
215
|
-
Route overrides use the same `target` object shape as reads.
|
|
216
|
-
Metadata mode can keep full `msg.slmp`, emit only `target` plus `itemCount`, or leave `msg.slmp` unchanged.
|
|
217
|
-
|
|
218
|
-
## Route overrides
|
|
219
|
-
|
|
220
|
-
Use a `target` object when one request needs a different route than the shared connection default:
|
|
221
|
-
|
|
222
|
-
```json
|
|
223
|
-
{
|
|
224
|
-
"addresses": ["D300,4", "DSTR320,10"],
|
|
225
|
-
"target": {
|
|
226
|
-
"network": 0,
|
|
227
|
-
"station": 255,
|
|
228
|
-
"moduleIO": "03FF",
|
|
229
|
-
"multidrop": 0
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
The editor validates connection ranges, literal address lists, literal update payloads, and literal route JSON before save.
|
|
235
|
-
|
|
236
|
-
## Example flows
|
|
237
|
-
|
|
238
|
-
Read:
|
|
239
|
-
|
|
240
|
-
```json
|
|
241
|
-
{
|
|
242
|
-
"addresses": ["D100", "D100,3", "D200:F", "D200:F,2", "D50.3", "D100:STR,10"]
|
|
243
|
-
}
|
|
244
|
-
```
|
|
245
|
-
|
|
246
|
-
Write:
|
|
247
|
-
|
|
248
|
-
```json
|
|
249
|
-
{
|
|
250
|
-
"payload": {
|
|
251
|
-
"D100": 42,
|
|
252
|
-
"D100,3": [10, 11, 12],
|
|
253
|
-
"D50.3": true,
|
|
254
|
-
"D100:STR,10": "HELLO"
|
|
255
|
-
}
|
|
256
|
-
}
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
Import one of the ready-to-run flows under [examples/flows](https://github.com/fa-yoshinobu/node-red-contrib-plc-comm-slmp/blob/main/examples/flows/README.md):
|
|
260
|
-
|
|
261
|
-
- [`slmp-demo.json`](https://github.com/fa-yoshinobu/node-red-contrib-plc-comm-slmp/blob/main/examples/flows/slmp-demo.json): combined demo
|
|
262
|
-
- [`slmp-basic-read-write.json`](https://github.com/fa-yoshinobu/node-red-contrib-plc-comm-slmp/blob/main/examples/flows/slmp-basic-read-write.json): scalar, float, and bit read/write over TCP
|
|
263
|
-
- [`slmp-array-string.json`](https://github.com/fa-yoshinobu/node-red-contrib-plc-comm-slmp/blob/main/examples/flows/slmp-array-string.json): array and string read/write over TCP
|
|
264
|
-
- [`slmp-control-error.json`](https://github.com/fa-yoshinobu/node-red-contrib-plc-comm-slmp/blob/main/examples/flows/slmp-control-error.json): control messages, `msg` source, and second-output errors
|
|
265
|
-
- [`slmp-device-matrix.json`](https://github.com/fa-yoshinobu/node-red-contrib-plc-comm-slmp/blob/main/examples/flows/slmp-device-matrix.json): one-by-one high-level read, write, and readback across the matrix catalog with completed-result history, run summary, and JSONL logging in `Node-RED userDir/logs/slmp-device-matrix-<session>.jsonl`
|
|
86
|
+
### Changes Since Flow Library 0.2.3
|
|
87
|
+
|
|
88
|
+
The Node-RED Flow Library currently shows `0.2.3` as the published baseline for this scoped package. Check these changes before updating an existing flow:
|
|
89
|
+
|
|
90
|
+
- `slmp-connection` now uses one `PLC type` selector. Older `PLC series` and `frame type` fields from Flow Library `0.2.3` flows must be reselected after import.
|
|
91
|
+
- `X/Y` string addresses are PLC-type-specific: iQ-F uses octal `X/Y`, while the other supported PLC types use hexadecimal `X/Y`.
|
|
92
|
+
- `LTS`, `LTC`, `LSTS`, `LSTC`, `LCS`, `LCC`, and `LZ` are now in the high-level surface where the selected PLC type supports them.
|
|
93
|
+
- Device codes unsupported by the selected PLC type are errors by default. The `slmp-device-matrix.json` sample can instead log them as `SKIPPED` records when it sends `slmpSkipUnsupported`.
|
|
94
|
+
|
|
95
|
+
## Supported PLC Registers
|
|
96
|
+
|
|
97
|
+
Start with these register/device families first:
|
|
98
|
+
|
|
99
|
+
- word devices: `D`, `SD`, `R`, `ZR`, `TN`, `CN`
|
|
100
|
+
- bit devices: `M`, `X`, `Y`, `SM`, `B`
|
|
101
|
+
- typed forms: `D100:S`, `D100:I`, `D200:F`, `D300:L`
|
|
102
|
+
- special Node-RED forms: `D100,10`, `M1000,8`, `D100:STR,10`, `DSTR100,10`
|
|
103
|
+
- bit-in-word form: `D50.3`
|
|
104
|
+
|
|
105
|
+
See the full public table in [Supported PLC Registers](https://github.com/fa-yoshinobu/node-red-contrib-plc-comm-slmp/blob/main/docsrc/user/SUPPORTED_REGISTERS.md).
|
|
106
|
+
|
|
107
|
+
## Documentation
|
|
108
|
+
|
|
109
|
+
- [Getting Started](https://github.com/fa-yoshinobu/node-red-contrib-plc-comm-slmp/blob/main/docsrc/user/GETTING_STARTED.md)
|
|
110
|
+
- [Supported PLC Registers](https://github.com/fa-yoshinobu/node-red-contrib-plc-comm-slmp/blob/main/docsrc/user/SUPPORTED_REGISTERS.md)
|
|
111
|
+
- [Latest Communication Verification](https://github.com/fa-yoshinobu/node-red-contrib-plc-comm-slmp/blob/main/docsrc/user/LATEST_COMMUNICATION_VERIFICATION.md)
|
|
112
|
+
- [User Guide](https://github.com/fa-yoshinobu/node-red-contrib-plc-comm-slmp/blob/main/docsrc/user/USER_GUIDE.md)
|
|
113
|
+
- [Example Flows](https://github.com/fa-yoshinobu/node-red-contrib-plc-comm-slmp/blob/main/examples/flows/README.md)
|
|
114
|
+
- [Documentation Index](https://github.com/fa-yoshinobu/node-red-contrib-plc-comm-slmp/blob/main/docsrc/index.md)
|
|
115
|
+
|
|
116
|
+
Maintainer-only notes and retained evidence live under `internal_docs/`.
|
|
117
|
+
|
|
118
|
+
## What You Can Do
|
|
119
|
+
|
|
120
|
+
- Binary 3E and 4E frames
|
|
121
|
+
- TCP and UDP transport
|
|
122
|
+
- reusable `slmp-connection`
|
|
123
|
+
- high-level reads and writes through `slmp-read` and `slmp-write`
|
|
124
|
+
- typed source selection for literal / `msg` / `flow` / `global` / `env`
|
|
125
|
+
- per-request routing via `msg.target` or configured route sources
|
|
126
|
+
- read output selection for object / array / single value
|
|
127
|
+
- metadata emission selection for `msg.slmp`
|
|
128
|
+
- configurable error handling with throw / `msg.error` / second output
|
|
129
|
+
- connection control via `connect` / `disconnect` / `reinitialize` messages
|
|
130
|
+
|
|
131
|
+
Set one explicit PLC type for each connection. The node stores it as `plcFamily` internally and derives `frameType`, access profile, and `X/Y` string-address rules from that selection.
|
|
132
|
+
|
|
133
|
+
Supported canonical PLC type values:
|
|
134
|
+
|
|
135
|
+
- `iq-f`
|
|
136
|
+
- `iq-r`
|
|
137
|
+
- `iq-l`
|
|
138
|
+
- `mx-f`
|
|
139
|
+
- `mx-r`
|
|
140
|
+
- `qcpu`
|
|
141
|
+
- `lcpu`
|
|
142
|
+
- `qnu`
|
|
143
|
+
- `qnudv`
|
|
144
|
+
|
|
145
|
+
## Underlying JS Helper
|
|
146
|
+
|
|
147
|
+
The package also exports the underlying SLMP helper library for the same read/write model used by the Node-RED nodes:
|
|
148
|
+
|
|
149
|
+
```js
|
|
150
|
+
const { SlmpClient, readNamed } = require("@fa_yoshinobu/node-red-contrib-plc-comm-slmp/lib/slmp");
|
|
151
|
+
|
|
152
|
+
async function main() {
|
|
153
|
+
const client = new SlmpClient({
|
|
154
|
+
host: "192.168.250.100",
|
|
155
|
+
port: 1025,
|
|
156
|
+
plcFamily: "qnu",
|
|
157
|
+
});
|
|
158
|
+
const values = await readNamed(client, ["D300", "D300,4"]);
|
|
159
|
+
console.log(values);
|
|
160
|
+
}
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
The helper validates address format, protocol constraints, and device-code support for the selected `plcFamily`, but does not pre-check PLC model-specific device ranges or upper bounds.
|
|
164
|
+
If an address is outside the connected PLC's actual range, the PLC response is returned as the runtime error.
|
|
165
|
+
|
|
166
|
+
## Current Public Register Scope
|
|
167
|
+
|
|
168
|
+
- bit devices: `SM`, `X`, `Y`, `M`, `L`, `F`, `V`, `B`, `TS`, `TC`, `LTS`, `LTC`, `STS`, `STC`, `LSTS`, `LSTC`, `CS`, `CC`, `LCS`, `LCC`, `SB`, `DX`, `DY`
|
|
169
|
+
- word devices: `SD`, `D`, `W`, `TN`, `LTN`, `STN`, `LSTN`, `CN`, `LCN`, `SW`, `Z`, `LZ`, `R`, `ZR`, `RD`
|
|
170
|
+
- typed views: `:S`, `:I` (alias of `:S`), `:D`, `:L`, `:F`
|
|
171
|
+
- string/count views: `,count`, `:STR`, `DSTR`
|
|
172
|
+
- word-bit view: `.bit`
|
|
173
|
+
|
|
174
|
+
Public device-code support by `plcFamily`:
|
|
175
|
+
|
|
176
|
+
| PLC type | Public device codes accepted by the high-level API and Node-RED editor |
|
|
177
|
+
| --- | --- |
|
|
178
|
+
| `iq-r`, `iq-l`, `mx-f`, `mx-r` | `SM`, `SD`, `X`, `Y`, `M`, `L`, `F`, `V`, `B`, `D`, `W`, `TS`, `TC`, `TN`, `LTS`, `LTC`, `LTN`, `STS`, `STC`, `STN`, `LSTS`, `LSTC`, `LSTN`, `CS`, `CC`, `CN`, `LCS`, `LCC`, `LCN`, `SB`, `SW`, `DX`, `DY`, `Z`, `LZ`, `R`, `ZR`, `RD` |
|
|
179
|
+
| `iq-f` | `SM`, `SD`, `X`, `Y`, `M`, `L`, `F`, `B`, `D`, `W`, `TS`, `TC`, `TN`, `STS`, `STC`, `STN`, `CS`, `CC`, `CN`, `LCS`, `LCC`, `LCN`, `SB`, `SW`, `Z`, `LZ`, `R` |
|
|
180
|
+
| `qcpu` | `SM`, `SD`, `X`, `Y`, `M`, `L`, `F`, `V`, `B`, `D`, `W`, `TS`, `TC`, `TN`, `STS`, `STC`, `STN`, `CS`, `CC`, `CN`, `SB`, `SW`, `DX`, `DY`, `Z`, `R`, `ZR` |
|
|
181
|
+
| `lcpu`, `qnu`, `qnudv` | `SM`, `SD`, `X`, `Y`, `M`, `L`, `F`, `V`, `B`, `D`, `W`, `TS`, `TC`, `TN`, `STS`, `STC`, `STN`, `CS`, `CC`, `CN`, `SB`, `SW`, `DX`, `DY`, `Z`, `R`, `ZR` |
|
|
182
|
+
|
|
183
|
+
Validated public hardware summary:
|
|
184
|
+
|
|
185
|
+
- `FX5UC-32MT/D`
|
|
186
|
+
- `Q06UDVCPU`
|
|
187
|
+
- `R08CPU`
|
|
188
|
+
|
|
189
|
+
## Example Flows
|
|
190
|
+
|
|
191
|
+
- [`slmp-demo.json`](https://github.com/fa-yoshinobu/node-red-contrib-plc-comm-slmp/blob/main/examples/flows/slmp-demo.json): combined demo
|
|
192
|
+
- [`slmp-basic-read-write.json`](https://github.com/fa-yoshinobu/node-red-contrib-plc-comm-slmp/blob/main/examples/flows/slmp-basic-read-write.json): scalar, float, and bit read/write over TCP
|
|
193
|
+
- [`slmp-array-string.json`](https://github.com/fa-yoshinobu/node-red-contrib-plc-comm-slmp/blob/main/examples/flows/slmp-array-string.json): array and string read/write over TCP
|
|
194
|
+
- [`slmp-control-error.json`](https://github.com/fa-yoshinobu/node-red-contrib-plc-comm-slmp/blob/main/examples/flows/slmp-control-error.json): control messages, `msg` source, and second-output errors
|
|
195
|
+
- [`slmp-device-matrix.json`](https://github.com/fa-yoshinobu/node-red-contrib-plc-comm-slmp/blob/main/examples/flows/slmp-device-matrix.json): one-by-one and run-all high-level read, write, and readback across the matrix catalog with one outstanding request at a time, status lamp feedback, completed-result history, run summary, unsupported-device skip records, and JSONL logging in `Node-RED userDir/logs/slmp-device-matrix-<session>.jsonl`
|
|
266
196
|
- [`slmp-routing.json`](https://github.com/fa-yoshinobu/node-red-contrib-plc-comm-slmp/blob/main/examples/flows/slmp-routing.json): per-request routing with `msg.target`
|
|
267
197
|
- [`slmp-udp-read-write.json`](https://github.com/fa-yoshinobu/node-red-contrib-plc-comm-slmp/blob/main/examples/flows/slmp-udp-read-write.json): basic UDP read/write
|
|
268
198
|
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
-
|
|
274
|
-
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
-
|
|
294
|
-
-
|
|
295
|
-
-
|
|
199
|
+
The device-matrix flow records `plcFamily` in each JSONL result, keeps one outstanding request at a time, and summarizes `OK`, `SKIPPED`, `NG`, mismatch, timeout, and pending counts.
|
|
200
|
+
|
|
201
|
+
## Known Limitations
|
|
202
|
+
|
|
203
|
+
- the high-level Node-RED surface requires explicit PLC type selection
|
|
204
|
+
- `.bit,count` is not supported
|
|
205
|
+
- a single client connection keeps requests serialized by default
|
|
206
|
+
- the read and write nodes keep the caller-visible logical request shape and do not silently retry with a different fallback split semantics
|
|
207
|
+
- `G` and `HG` are not part of the current public high-level register table
|
|
208
|
+
|
|
209
|
+
## Development
|
|
210
|
+
|
|
211
|
+
Run the local test suite:
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
cmd /c npm.cmd test
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## Notes
|
|
218
|
+
|
|
219
|
+
- `.bit` notation is only valid for word devices such as `D50.3`
|
|
220
|
+
- direct bit devices should be addressed directly as `M1000`, `X1F`, `Y20`
|
|
221
|
+
- `LTN`, `LSTN`, `LCN`, and `LZ` default to 32-bit `:D` access in high-level helpers; iQ-F `LZ` samples should use `LZ0` or `LZ1`
|
|
222
|
+
- `LCN` current-value reads and writes use random dword access in the high-level helpers
|
|
223
|
+
- `LTS`, `LTC`, `LSTS`, and `LSTC` state reads use the long timer 4-word decode helpers
|
|
224
|
+
- `LCS` and `LCC` state reads use direct bit read; high-level state writes use random bit write (`0x1402`)
|
|
225
|
+
- low-level direct bit writes are guarded for `LTS`/`LTC`/`LSTS`/`LSTC`/`LCS`/`LCC`
|
|
226
|
+
- `X/Y` string addresses require explicit PLC type selection
|
|
227
|
+
- `iq-f` interprets `X/Y` string addresses in octal, while other supported families use hexadecimal `X/Y`
|
|
228
|
+
- random read batching follows the Python helper layer for batchable word devices
|
package/docsrc/assets/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# Assets
|
|
2
|
-
|
|
3
|
-
See also:
|
|
4
|
-
|
|
5
|
-
- [Project README](../../README.md)
|
|
6
|
-
- [Documentation Index](../index.md)
|
|
7
|
-
|
|
8
|
-
Place shared documentation assets for `@fa_yoshinobu/node-red-contrib-plc-comm-slmp` here.
|
|
9
|
-
|
|
10
|
-
- `node-red-slmp.png`: README hero image for the Node-RED SLMP package
|
|
1
|
+
# Assets
|
|
2
|
+
|
|
3
|
+
See also:
|
|
4
|
+
|
|
5
|
+
- [Project README](../../README.md)
|
|
6
|
+
- [Documentation Index](../index.md)
|
|
7
|
+
|
|
8
|
+
Place shared documentation assets for `@fa_yoshinobu/node-red-contrib-plc-comm-slmp` here.
|
|
9
|
+
|
|
10
|
+
- `node-red-slmp.png`: README hero image for the Node-RED SLMP package
|