node-red-contrib-my-tools 1.0.0
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/README.txt +69 -0
- package/node-red-contrib-mysql-extended-test/mysql-extended.html +443 -0
- package/node-red-contrib-mysql-extended-test/mysql-extended.js +355 -0
- package/node-red-contrib-rfid-helper/rfid-lazy.html +153 -0
- package/node-red-contrib-rfid-helper/rfid-lazy.js +361 -0
- package/node-red-contrib-s7-plus/LICENSE +235 -0
- package/node-red-contrib-s7-plus/README.md +141 -0
- package/node-red-contrib-s7-plus/examples/read-multiple-values-flow.json +346 -0
- package/node-red-contrib-s7-plus/examples/read-write-test-flow.json +172 -0
- package/node-red-contrib-s7-plus/examples/write-single-values-flow.json +5583 -0
- package/node-red-contrib-s7-plus/lib/s7plus/browse/README.md +72 -0
- package/node-red-contrib-s7-plus/lib/s7plus/browse/areas.js +36 -0
- package/node-red-contrib-s7-plus/lib/s7plus/browse/datatypes.js +91 -0
- package/node-red-contrib-s7-plus/lib/s7plus/browse/flat-browser.js +433 -0
- package/node-red-contrib-s7-plus/lib/s7plus/browse/index.js +22 -0
- package/node-red-contrib-s7-plus/lib/s7plus/browse/lazy.js +397 -0
- package/node-red-contrib-s7-plus/lib/s7plus/browse/node-id.js +22 -0
- package/node-red-contrib-s7-plus/lib/s7plus/browse/resolve-symbolic.js +181 -0
- package/node-red-contrib-s7-plus/lib/s7plus/browse/vte-helpers.js +49 -0
- package/node-red-contrib-s7-plus/lib/s7plus/buffer-stream.js +96 -0
- package/node-red-contrib-s7-plus/lib/s7plus/client.js +1238 -0
- package/node-red-contrib-s7-plus/lib/s7plus/constants.js +155 -0
- package/node-red-contrib-s7-plus/lib/s7plus/crc/index.js +3 -0
- package/node-red-contrib-s7-plus/lib/s7plus/crc/s7-crc32.js +70 -0
- package/node-red-contrib-s7-plus/lib/s7plus/crc/symbol-crc.js +271 -0
- package/node-red-contrib-s7-plus/lib/s7plus/debug.js +88 -0
- package/node-red-contrib-s7-plus/lib/s7plus/explore-result.js +41 -0
- package/node-red-contrib-s7-plus/lib/s7plus/item-address.js +55 -0
- package/node-red-contrib-s7-plus/lib/s7plus/pdu-explore.js +77 -0
- package/node-red-contrib-s7-plus/lib/s7plus/pdu-messages.js +359 -0
- package/node-red-contrib-s7-plus/lib/s7plus/pobject.js +197 -0
- package/node-red-contrib-s7-plus/lib/s7plus/pvalue-codec.js +435 -0
- package/node-red-contrib-s7-plus/lib/s7plus/pvalue.js +653 -0
- package/node-red-contrib-s7-plus/lib/s7plus/pvar-lists.js +336 -0
- package/node-red-contrib-s7-plus/lib/s7plus/read-result.js +91 -0
- package/node-red-contrib-s7-plus/lib/s7plus/s7p.js +266 -0
- package/node-red-contrib-s7-plus/lib/s7plus/tag-routing.js +30 -0
- package/node-red-contrib-s7-plus/lib/s7plus/transport/cotp-stream.js +335 -0
- package/node-red-contrib-s7-plus/lib/s7plus/transport/s7-transport.js +335 -0
- package/node-red-contrib-s7-plus/nodes/icons/s7complus.png +0 -0
- package/node-red-contrib-s7-plus/nodes/icons/s7complus.svg +17 -0
- package/node-red-contrib-s7-plus/nodes/s7complus-endpoint.js +825 -0
- package/node-red-contrib-s7-plus/nodes/s7complus-explore.js +91 -0
- package/node-red-contrib-s7-plus/nodes/s7complus-in.js +255 -0
- package/node-red-contrib-s7-plus/nodes/s7complus-out.js +182 -0
- package/node-red-contrib-s7-plus/nodes/s7complus.html +1541 -0
- package/node-red-contrib-s7-plus/nodes/s7complus.js +10 -0
- package/node-red-contrib-s7-plus/package.json +50 -0
- package/node-red-contrib-s7-plus/plc/s7-1500/DB_Arrays.db +17 -0
- package/node-red-contrib-s7-plus/plc/s7-1500/DB_Binary.db +16 -0
- package/node-red-contrib-s7-plus/plc/s7-1500/DB_BitStrings.db +36 -0
- package/node-red-contrib-s7-plus/plc/s7-1500/DB_CharacterStrings.db +42 -0
- package/node-red-contrib-s7-plus/plc/s7-1500/DB_DateAndTime.db +70 -0
- package/node-red-contrib-s7-plus/plc/s7-1500/DB_FloatingPoint.db +42 -0
- package/node-red-contrib-s7-plus/plc/s7-1500/DB_Integers.db +72 -0
- package/node-red-contrib-s7-plus/plc/s7-1500/DB_Timers.db +40 -0
- package/node-red-contrib-s7-plus/scripts/example-flow-shared.js +39 -0
- package/node-red-contrib-s7-plus/scripts/generate-read-multiple-flow.js +331 -0
- package/node-red-contrib-s7-plus/scripts/generate-rw-test-flow.js +690 -0
- package/node-red-contrib-s7-plus/scripts/generate-write-flow.js +476 -0
- package/node-red-contrib-s7-plus/scripts/layout-write-flow.js +156 -0
- package/node-red-contrib-s7-plus/scripts/run-tests.js +16 -0
- package/node-red-flowgobal-change/variable-change.html +425 -0
- package/node-red-flowgobal-change/variable-change.js +92 -0
- package/node-red-ui_media_viewer/ui_media_viewer.html +87 -0
- package/node-red-ui_media_viewer/ui_media_viewer.js +136 -0
- package/package.json +12 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
# node-red-contrib-s7-plus
|
|
2
|
+
|
|
3
|
+
Node-RED nodes for symbolic read/write access to Siemens S7-1200/1500 PLCs over the native **S7CommPlus** protocol.
|
|
4
|
+
|
|
5
|
+
Maintained by [DataLogXE](https://github.com/DataLogXE).
|
|
6
|
+
|
|
7
|
+
## Why this package
|
|
8
|
+
|
|
9
|
+
Most S7 drivers make you translate every tag into a byte/offset address (`DB1.DBX0.0`) and pick the right data type by hand. This package talks the PLC's **own symbolic protocol** instead — you browse the live symbol tree and click the tag you want. The driver resolves the address and data type for you, at runtime.
|
|
10
|
+
|
|
11
|
+
- **Full symbolic access** — browse the live PLC tree (DBs, structs, arrays) and add tags with one click via **Pick from PLC**. No address math.
|
|
12
|
+
- **Optimized *and* non-optimized blocks** — works with modern optimized data blocks out of the box, not just legacy layouts.
|
|
13
|
+
- **Automatic data types** — types are resolved symbolically at runtime; you never set them manually. If the PLC program changes, the mismatch is detected and tags are re-resolved automatically.
|
|
14
|
+
- **Secure by design** — native S7CommPlus over **TLS 1.3**.
|
|
15
|
+
- **Multi-symbol read/write** — read or write many tags in a single request, each with its own per-symbol status (a single bad tag doesn't fail the whole batch).
|
|
16
|
+
- **Resilient connection** — shared endpoint with reconnect/watchdog handling and overload protection (`skipped (busy)`).
|
|
17
|
+
- **Batteries included** — ready-to-import example flows and PLC test data blocks to get you running fast.
|
|
18
|
+
|
|
19
|
+
## Quick start
|
|
20
|
+
|
|
21
|
+
Install from the Node-RED palette manager (**Manage palette → Install → `node-red-contrib-s7-plus`**), or from the command line in your Node-RED user directory:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install node-red-contrib-s7-plus
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Then build a minimal read flow:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
[inject] → [S7+ Read] → [debug]
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
1. Add an **S7+ Endpoint** and enter the PLC IP address.
|
|
34
|
+
2. On the **S7+ Read** node, click **Pick from PLC** and select your tags from the tree.
|
|
35
|
+
3. Wire an **inject** in front and **deploy** — every incoming message triggers one read.
|
|
36
|
+
|
|
37
|
+
The result lands in `msg.payload` (object format):
|
|
38
|
+
|
|
39
|
+
```json
|
|
40
|
+
{
|
|
41
|
+
"Motor.speed": { "value": 1450, "status": "ok", "error": "" },
|
|
42
|
+
"Tank.level": { "value": 73.2, "status": "ok", "error": "" }
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Writing works the same way: pick the tags, then send the value(s) in `msg.payload` (a scalar for one tag, or an object keyed by tag name for several).
|
|
47
|
+
|
|
48
|
+
## Nodes
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
| Node | Description |
|
|
52
|
+
| ---------------- | ----------------------------------------------------------------------------------------------------------------- |
|
|
53
|
+
| **S7+ Endpoint** | Shared connection (IP, port 102, timeout, reconnect/watchdog). |
|
|
54
|
+
| **S7+ Read** | Read symbol(s) on input; results in `msg.payload`. Override with `msg.symbols`, add extras with `msg.addSymbols`. |
|
|
55
|
+
| **S7+ Write** | Write values via `msg.payload`; override symbols with `msg.symbols`. Result replaces `msg.payload`. |
|
|
56
|
+
| **S7+ Explore** | Full symbol catalog: flat names in `msg.payload`, optional `msg.infos`, browse summary in `msg.meta`. |
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
## Symbolic addressing
|
|
60
|
+
|
|
61
|
+
1. Add an **S7+ Endpoint** with the PLC IP address.
|
|
62
|
+
2. In **S7+ Read** / **S7+ Write**, use **Pick from PLC** to browse the tree (DBs, structs, arrays) and add each symbol you need (e.g. `Motor.speed`, `Tank.level`).
|
|
63
|
+
|
|
64
|
+
The node stores `name` → internal **access string** (hex, e.g. `8A0E0001.A`). You normally never deal with hex: every tag is re-resolved symbolically at runtime, so the correct data type is always determined automatically.
|
|
65
|
+
|
|
66
|
+
## Data type mapping
|
|
67
|
+
|
|
68
|
+
**S7 datatype → JavaScript type**
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
| S7 Datatype | JavaScript Type | Note |
|
|
72
|
+
| ---------------------------------------- | --------------- | -------------------------------------------------------------------- |
|
|
73
|
+
| Bool | `boolean` | |
|
|
74
|
+
| Byte, Word, DWord | `number` | |
|
|
75
|
+
| LWord | `BigInt` | 64-bit, exceeds JS number |
|
|
76
|
+
| Char, WChar | `string` | single character |
|
|
77
|
+
| String, WString | `string` | |
|
|
78
|
+
| SInt, Int, DInt, USInt, UInt, UDInt | `number` | |
|
|
79
|
+
| LInt, ULInt | `BigInt` | |
|
|
80
|
+
| Real, LReal | `number` | |
|
|
81
|
+
| Time, S5Time | `number` | milliseconds |
|
|
82
|
+
| LTime | `BigInt` | nanoseconds |
|
|
83
|
+
| TOD (Time_Of_Day) | `number` | milliseconds since midnight |
|
|
84
|
+
| LTOD | `BigInt` | nanoseconds since midnight |
|
|
85
|
+
| Date | `Date` | |
|
|
86
|
+
| LDT, DTL | `Date` | ms resolution; sub-ms nanoseconds are not represented in a JS `Date` |
|
|
87
|
+
| Hardware datatypes (HW_IO, HW_DEVICE, …) | `number` | |
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
## Requirements
|
|
91
|
+
|
|
92
|
+
- Node.js >= 20
|
|
93
|
+
- Node-RED >= 3.0
|
|
94
|
+
- S7-1200/1500 with secure communication (TLS) enabled; symbolic access for optimized and non-optimized blocks
|
|
95
|
+
- Project engineered with TIA Portal >= V17
|
|
96
|
+
|
|
97
|
+
> **TLS 1.3 required.** Minimum PLC firmware: **S7-1200 >= V4.5**, **S7-1500 >= V2.9** — this driver negotiates **TLS 1.3 only**. Firmware versions that offer only TLS 1.2 (e.g. S7-1200 V4.3/V4.4) are **not** supported, even though the upstream [S7CommPlusDriver](https://github.com/thomas-v2/S7CommPlusDriver) lists them.
|
|
98
|
+
|
|
99
|
+
## Examples
|
|
100
|
+
|
|
101
|
+
Example flows live in `[examples/](examples/)`. They target the test data blocks in `[plc/s7-1500/](plc/s7-1500/)` (S7-1500, optimized access).
|
|
102
|
+
|
|
103
|
+
**PLC setup:** import the `DB_*.db` sources from `plc/s7-1500/` into your TIA Portal project, compile, download, and ensure secure communication (TLS) and symbolic access are enabled.
|
|
104
|
+
|
|
105
|
+
**Node-RED setup:** **Import** one or more JSON files from `examples/`, **Deploy**, then open the shared **S7+ Endpoint** config node (`PLC`) and set the PLC IP address. All example flows reuse the same endpoint id (`example_plc_ep`), so importing multiple flows creates only one config node.
|
|
106
|
+
|
|
107
|
+
Suggested order: **read multiple** → **write single** → **R/W verification**.
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
| File | Purpose |
|
|
111
|
+
| --------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
112
|
+
| `[read-multiple-values-flow.json](examples/read-multiple-values-flow.json)` | Read many symbols in one request — static symbol list in the read node, plus a second path with runtime `msg.symbols`. |
|
|
113
|
+
| `[write-single-values-flow.json](examples/write-single-values-flow.json)` | Manual write tests — one inject per scalar constant writes to the matching `*_write` tag; each datatype group includes a read-back row. Covers Binary through Timers; hardware and system datatypes are excluded. |
|
|
114
|
+
| `[read-write-test-flow.json](examples/read-write-test-flow.json)` | Automated verification — one inject runs write → read-back → compare for every scalar constant across all datatypes. Emits one result per datatype and a final summary; the run completes even when individual cases fail. |
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
Flows are generated from the PLC DB sources. To regenerate after changing `plc/s7-1500/`:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
node scripts/generate-read-multiple-flow.js
|
|
121
|
+
node scripts/generate-write-flow.js
|
|
122
|
+
node scripts/generate-rw-test-flow.js
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Status
|
|
126
|
+
|
|
127
|
+
- Open-source software (LGPL-3.0-or-later), provided as-is without warranty
|
|
128
|
+
- Development stage — not approved for production use
|
|
129
|
+
- You are responsible for how and where you use it
|
|
130
|
+
- Not affiliated with or supported by Siemens
|
|
131
|
+
|
|
132
|
+
## License
|
|
133
|
+
|
|
134
|
+
Copyright (C) 2026 Robert Mederer - [DataLogXE](https://github.com/DataLogXE). Licensed under LGPL-3.0-or-later. See [LICENSE](LICENSE).
|
|
135
|
+
|
|
136
|
+
This project builds on the following work:
|
|
137
|
+
|
|
138
|
+
- **S7CommPlus protocol portions** — derived from [S7CommPlusDriver](https://github.com/thomas-v2/S7CommPlusDriver) (Thomas Wiens, LGPL-3.0-or-later).
|
|
139
|
+
- **ISO-on-TCP/COTP transport patterns** — informed by [Snap7](https://github.com/davenardella/snap7) (Davide Nardella, LGPL-3.0) and the C# reference driver above.
|
|
140
|
+
- **S7CommPlus SymbolCRC (CRC32 polynomial and algorithm)** — informed by [HarpoS7](https://github.com/bonk-dev/HarpoS7) (bonk, MIT); see [LICENSE](LICENSE) for the full MIT notice.
|
|
141
|
+
|
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "read_multi_tab",
|
|
4
|
+
"type": "tab",
|
|
5
|
+
"label": "Read Multiple Values",
|
|
6
|
+
"disabled": false,
|
|
7
|
+
"info": "Reads many symbols at once with a single s7-plus read node.\n\n1) \"Read all values\" triggers one read of one representative constant per scalar datatype in plc/s7-1500 plus a few selected sample symbols. The read node lists all symbols in its config, so a single request returns the whole payload object (keyed by symbol).\n\n2) \"Read selected symbols\" shows the dynamic variant: a function node sets msg.symbols (a string[] with the same symbols as block 1) at runtime and feeds an unconfigured read node.\n\nRegenerate with: node scripts/generate-read-multiple-flow.js"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"id": "rm_hdr",
|
|
11
|
+
"type": "comment",
|
|
12
|
+
"z": "read_multi_tab",
|
|
13
|
+
"name": "Read multiple values — one s7-plus read node, many symbols, one request",
|
|
14
|
+
"info": "",
|
|
15
|
+
"x": 360,
|
|
16
|
+
"y": 40,
|
|
17
|
+
"wires": []
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": "rm_comment_all",
|
|
21
|
+
"type": "comment",
|
|
22
|
+
"z": "read_multi_tab",
|
|
23
|
+
"name": "1) Static config: all symbols listed in the read node",
|
|
24
|
+
"info": "",
|
|
25
|
+
"x": 250,
|
|
26
|
+
"y": 100,
|
|
27
|
+
"wires": []
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"id": "rm_inject_all",
|
|
31
|
+
"type": "inject",
|
|
32
|
+
"z": "read_multi_tab",
|
|
33
|
+
"name": "Read all values",
|
|
34
|
+
"props": [
|
|
35
|
+
{
|
|
36
|
+
"p": "payload"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"repeat": "",
|
|
40
|
+
"crontab": "",
|
|
41
|
+
"once": false,
|
|
42
|
+
"onceDelay": 0.1,
|
|
43
|
+
"topic": "",
|
|
44
|
+
"payload": "",
|
|
45
|
+
"payloadType": "date",
|
|
46
|
+
"x": 150,
|
|
47
|
+
"y": 160,
|
|
48
|
+
"wires": [
|
|
49
|
+
[
|
|
50
|
+
"rm_read_all"
|
|
51
|
+
]
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"id": "rm_read_all",
|
|
56
|
+
"type": "s7-plus read",
|
|
57
|
+
"z": "read_multi_tab",
|
|
58
|
+
"name": "read all symbols",
|
|
59
|
+
"endpoint": "example_plc_ep",
|
|
60
|
+
"symbols": [
|
|
61
|
+
{
|
|
62
|
+
"name": "DB_FloatingPoint.Real_987d125",
|
|
63
|
+
"address": "DB_FloatingPoint.Real_987d125",
|
|
64
|
+
"datatype": "Real"
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"name": "DB_FloatingPoint.LReal_987d125",
|
|
68
|
+
"address": "DB_FloatingPoint.LReal_987d125",
|
|
69
|
+
"datatype": "LReal"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"name": "DB_Integers.Int_12345",
|
|
73
|
+
"address": "DB_Integers.Int_12345",
|
|
74
|
+
"datatype": "Int"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"name": "DB_Binary.Bool_False",
|
|
78
|
+
"address": "DB_Binary.Bool_False",
|
|
79
|
+
"datatype": "Bool"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"name": "DB_BitStrings.Byte_Min_0x00",
|
|
83
|
+
"address": "DB_BitStrings.Byte_Min_0x00",
|
|
84
|
+
"datatype": "Byte"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "DB_BitStrings.Word_Min_0x0000",
|
|
88
|
+
"address": "DB_BitStrings.Word_Min_0x0000",
|
|
89
|
+
"datatype": "Word"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"name": "DB_BitStrings.DWord_Min_0x00000000",
|
|
93
|
+
"address": "DB_BitStrings.DWord_Min_0x00000000",
|
|
94
|
+
"datatype": "DWord"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"name": "DB_BitStrings.LWord_Min_0x0000000000000000",
|
|
98
|
+
"address": "DB_BitStrings.LWord_Min_0x0000000000000000",
|
|
99
|
+
"datatype": "LWord"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "DB_CharacterStrings.Char_Space",
|
|
103
|
+
"address": "DB_CharacterStrings.Char_Space",
|
|
104
|
+
"datatype": "Char"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "DB_CharacterStrings.String_Empty",
|
|
108
|
+
"address": "DB_CharacterStrings.String_Empty",
|
|
109
|
+
"datatype": "String"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"name": "DB_CharacterStrings.WChar_Space",
|
|
113
|
+
"address": "DB_CharacterStrings.WChar_Space",
|
|
114
|
+
"datatype": "WChar"
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"name": "DB_CharacterStrings.WString_Empty",
|
|
118
|
+
"address": "DB_CharacterStrings.WString_Empty",
|
|
119
|
+
"datatype": "WString"
|
|
120
|
+
},
|
|
121
|
+
{
|
|
122
|
+
"name": "DB_Integers.SInt_Min_n128",
|
|
123
|
+
"address": "DB_Integers.SInt_Min_n128",
|
|
124
|
+
"datatype": "SInt"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
"name": "DB_Integers.Int_Min_n32768",
|
|
128
|
+
"address": "DB_Integers.Int_Min_n32768",
|
|
129
|
+
"datatype": "Int"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"name": "DB_Integers.DInt_Min_n2147483648",
|
|
133
|
+
"address": "DB_Integers.DInt_Min_n2147483648",
|
|
134
|
+
"datatype": "DInt"
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"name": "DB_Integers.USint_Min_0",
|
|
138
|
+
"address": "DB_Integers.USint_Min_0",
|
|
139
|
+
"datatype": "USInt"
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
"name": "DB_Integers.UInt_Min_0",
|
|
143
|
+
"address": "DB_Integers.UInt_Min_0",
|
|
144
|
+
"datatype": "UInt"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"name": "DB_Integers.UDInt_Min_0",
|
|
148
|
+
"address": "DB_Integers.UDInt_Min_0",
|
|
149
|
+
"datatype": "UDInt"
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"name": "DB_Integers.LInt_Min_n9223372036854775808",
|
|
153
|
+
"address": "DB_Integers.LInt_Min_n9223372036854775808",
|
|
154
|
+
"datatype": "LInt"
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"name": "DB_Integers.ULInt_Min_0",
|
|
158
|
+
"address": "DB_Integers.ULInt_Min_0",
|
|
159
|
+
"datatype": "ULInt"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
"name": "DB_FloatingPoint.Real_MinNeg_n3d402823e38",
|
|
163
|
+
"address": "DB_FloatingPoint.Real_MinNeg_n3d402823e38",
|
|
164
|
+
"datatype": "Real"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"name": "DB_FloatingPoint.LReal_MinNeg_n1d7976931348623157e308",
|
|
168
|
+
"address": "DB_FloatingPoint.LReal_MinNeg_n1d7976931348623157e308",
|
|
169
|
+
"datatype": "LReal"
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"name": "DB_DateAndTime.Date_Min_1990_01_01",
|
|
173
|
+
"address": "DB_DateAndTime.Date_Min_1990_01_01",
|
|
174
|
+
"datatype": "Date"
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"name": "DB_DateAndTime.Time_Of_Day_Min_00_00_00d000",
|
|
178
|
+
"address": "DB_DateAndTime.Time_Of_Day_Min_00_00_00d000",
|
|
179
|
+
"datatype": "TimeOfDay"
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"name": "DB_DateAndTime.Date_And_Time_Min_1990_01_01_00_00_00",
|
|
183
|
+
"address": "DB_DateAndTime.Date_And_Time_Min_1990_01_01_00_00_00",
|
|
184
|
+
"datatype": "DateAndTime"
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
"name": "DB_DateAndTime.LTOD_Min_00_00_00d000000000",
|
|
188
|
+
"address": "DB_DateAndTime.LTOD_Min_00_00_00d000000000",
|
|
189
|
+
"datatype": "LTod"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"name": "DB_DateAndTime.LDT_Min_1970_01_01_00_00_00d000000000",
|
|
193
|
+
"address": "DB_DateAndTime.LDT_Min_1970_01_01_00_00_00d000000000",
|
|
194
|
+
"datatype": "Ldt"
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
"name": "DB_DateAndTime.DTL_Min_1970_01_01_00_00_00d000000000",
|
|
198
|
+
"address": "DB_DateAndTime.DTL_Min_1970_01_01_00_00_00d000000000",
|
|
199
|
+
"datatype": "Dtl"
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"name": "DB_Timers.Time_Min_n24D_20H_31M_23S_648MS",
|
|
203
|
+
"address": "DB_Timers.Time_Min_n24D_20H_31M_23S_648MS",
|
|
204
|
+
"datatype": "Time"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"name": "DB_Timers.S5Time_Min_0MS",
|
|
208
|
+
"address": "DB_Timers.S5Time_Min_0MS",
|
|
209
|
+
"datatype": "S5Time"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"name": "DB_Timers.LTime_Min_n106751D_23H_47M_16S_854MS_775US_808NS",
|
|
213
|
+
"address": "DB_Timers.LTime_Min_n106751D_23H_47M_16S_854MS_775US_808NS",
|
|
214
|
+
"datatype": "LTime"
|
|
215
|
+
}
|
|
216
|
+
],
|
|
217
|
+
"outputFormat": "object",
|
|
218
|
+
"x": 410,
|
|
219
|
+
"y": 160,
|
|
220
|
+
"wires": [
|
|
221
|
+
[
|
|
222
|
+
"rm_debug_all"
|
|
223
|
+
]
|
|
224
|
+
]
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"id": "rm_debug_all",
|
|
228
|
+
"type": "debug",
|
|
229
|
+
"z": "read_multi_tab",
|
|
230
|
+
"name": "All values",
|
|
231
|
+
"active": true,
|
|
232
|
+
"tosidebar": true,
|
|
233
|
+
"console": false,
|
|
234
|
+
"tostatus": false,
|
|
235
|
+
"complete": "payload",
|
|
236
|
+
"targetType": "msg",
|
|
237
|
+
"statusVal": "",
|
|
238
|
+
"statusType": "auto",
|
|
239
|
+
"x": 660,
|
|
240
|
+
"y": 160,
|
|
241
|
+
"wires": []
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
"id": "rm_comment_live",
|
|
245
|
+
"type": "comment",
|
|
246
|
+
"z": "read_multi_tab",
|
|
247
|
+
"name": "2) Dynamic: msg.symbols set at runtime (same list as read all symbols)",
|
|
248
|
+
"info": "",
|
|
249
|
+
"x": 280,
|
|
250
|
+
"y": 260,
|
|
251
|
+
"wires": []
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
"id": "rm_inject_live",
|
|
255
|
+
"type": "inject",
|
|
256
|
+
"z": "read_multi_tab",
|
|
257
|
+
"name": "Read selected symbols",
|
|
258
|
+
"props": [
|
|
259
|
+
{
|
|
260
|
+
"p": "payload"
|
|
261
|
+
}
|
|
262
|
+
],
|
|
263
|
+
"repeat": "",
|
|
264
|
+
"crontab": "",
|
|
265
|
+
"once": false,
|
|
266
|
+
"onceDelay": 0.1,
|
|
267
|
+
"topic": "",
|
|
268
|
+
"payload": "",
|
|
269
|
+
"payloadType": "date",
|
|
270
|
+
"x": 150,
|
|
271
|
+
"y": 320,
|
|
272
|
+
"wires": [
|
|
273
|
+
[
|
|
274
|
+
"rm_fn_live"
|
|
275
|
+
]
|
|
276
|
+
]
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"id": "rm_fn_live",
|
|
280
|
+
"type": "function",
|
|
281
|
+
"z": "read_multi_tab",
|
|
282
|
+
"name": "Build msg.symbols",
|
|
283
|
+
"func": "msg.symbols = [\n \"DB_FloatingPoint.Real_987d125\",\n \"DB_FloatingPoint.LReal_987d125\",\n \"DB_Integers.Int_12345\",\n \"DB_Binary.Bool_False\",\n \"DB_BitStrings.Byte_Min_0x00\",\n \"DB_BitStrings.Word_Min_0x0000\",\n \"DB_BitStrings.DWord_Min_0x00000000\",\n \"DB_BitStrings.LWord_Min_0x0000000000000000\",\n \"DB_CharacterStrings.Char_Space\",\n \"DB_CharacterStrings.String_Empty\",\n \"DB_CharacterStrings.WChar_Space\",\n \"DB_CharacterStrings.WString_Empty\",\n \"DB_Integers.SInt_Min_n128\",\n \"DB_Integers.Int_Min_n32768\",\n \"DB_Integers.DInt_Min_n2147483648\",\n \"DB_Integers.USint_Min_0\",\n \"DB_Integers.UInt_Min_0\",\n \"DB_Integers.UDInt_Min_0\",\n \"DB_Integers.LInt_Min_n9223372036854775808\",\n \"DB_Integers.ULInt_Min_0\",\n \"DB_FloatingPoint.Real_MinNeg_n3d402823e38\",\n \"DB_FloatingPoint.LReal_MinNeg_n1d7976931348623157e308\",\n \"DB_DateAndTime.Date_Min_1990_01_01\",\n \"DB_DateAndTime.Time_Of_Day_Min_00_00_00d000\",\n \"DB_DateAndTime.Date_And_Time_Min_1990_01_01_00_00_00\",\n \"DB_DateAndTime.LTOD_Min_00_00_00d000000000\",\n \"DB_DateAndTime.LDT_Min_1970_01_01_00_00_00d000000000\",\n \"DB_DateAndTime.DTL_Min_1970_01_01_00_00_00d000000000\",\n \"DB_Timers.Time_Min_n24D_20H_31M_23S_648MS\",\n \"DB_Timers.S5Time_Min_0MS\",\n \"DB_Timers.LTime_Min_n106751D_23H_47M_16S_854MS_775US_808NS\"\n];\nmsg.payload = '';\nreturn msg;\n",
|
|
284
|
+
"outputs": 1,
|
|
285
|
+
"timeout": 0,
|
|
286
|
+
"noerr": 0,
|
|
287
|
+
"initialize": "",
|
|
288
|
+
"finalize": "",
|
|
289
|
+
"libs": [],
|
|
290
|
+
"x": 360,
|
|
291
|
+
"y": 320,
|
|
292
|
+
"wires": [
|
|
293
|
+
[
|
|
294
|
+
"rm_read_live"
|
|
295
|
+
]
|
|
296
|
+
]
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"id": "rm_read_live",
|
|
300
|
+
"type": "s7-plus read",
|
|
301
|
+
"z": "read_multi_tab",
|
|
302
|
+
"name": "read (msg.symbols)",
|
|
303
|
+
"endpoint": "example_plc_ep",
|
|
304
|
+
"symbols": [],
|
|
305
|
+
"outputFormat": "object",
|
|
306
|
+
"x": 600,
|
|
307
|
+
"y": 320,
|
|
308
|
+
"wires": [
|
|
309
|
+
[
|
|
310
|
+
"rm_debug_live"
|
|
311
|
+
]
|
|
312
|
+
]
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"id": "rm_debug_live",
|
|
316
|
+
"type": "debug",
|
|
317
|
+
"z": "read_multi_tab",
|
|
318
|
+
"name": "Selected symbols",
|
|
319
|
+
"active": true,
|
|
320
|
+
"tosidebar": true,
|
|
321
|
+
"console": false,
|
|
322
|
+
"tostatus": false,
|
|
323
|
+
"complete": "payload",
|
|
324
|
+
"targetType": "msg",
|
|
325
|
+
"statusVal": "",
|
|
326
|
+
"statusType": "auto",
|
|
327
|
+
"x": 840,
|
|
328
|
+
"y": 320,
|
|
329
|
+
"wires": []
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
"id": "example_plc_ep",
|
|
333
|
+
"type": "s7-plus endpoint",
|
|
334
|
+
"name": "PLC",
|
|
335
|
+
"address": "192.168.0.1",
|
|
336
|
+
"timeout": 10000
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"id": "69768f9f5a51add5",
|
|
340
|
+
"type": "global-config",
|
|
341
|
+
"env": [],
|
|
342
|
+
"modules": {
|
|
343
|
+
"node-red-contrib-s7-plus": "0.0.1"
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
]
|