node-red-contrib-event-calc 3.3.6 → 3.3.15
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.md +100 -62
- package/examples/alarm-simulation-example.json +288 -0
- package/examples/isa88-batch-example.json +278 -0
- package/examples/opcua-alarm-example.json +516 -0
- package/examples/test-flows.json +723 -0
- package/examples/throughput-test.json +293 -0
- package/nodes/event-alarm.html +252 -0
- package/nodes/event-alarm.js +292 -0
- package/nodes/event-cache.js +72 -37
- package/nodes/event-calc.js +114 -124
- package/nodes/event-frame.html +192 -0
- package/nodes/event-frame.js +246 -0
- package/nodes/simple-frame.html +125 -0
- package/nodes/simple-frame.js +126 -0
- package/package.json +5 -2
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"id": "isa88-batch-flow",
|
|
4
|
+
"type": "tab",
|
|
5
|
+
"label": "ISA-88 Event Frame Example",
|
|
6
|
+
"disabled": false,
|
|
7
|
+
"info": "Demonstrates event-frame with ISA-88 hierarchy.\n\nProcedure > Unit Procedure > Operation > Phase\n\nEach level starts independently. Child frames auto-link to their\nparent via parentLevel lookup.\n\nEnding a parent auto-ends all children (cascade).\nChildren can also be ended individually."
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"id": "comment-title",
|
|
11
|
+
"type": "comment",
|
|
12
|
+
"z": "isa88-batch-flow",
|
|
13
|
+
"name": "ISA-88 Event Frames: Procedure > Unit Procedure > Operation > Phase",
|
|
14
|
+
"info": "Each level starts on its own trigger.\nparent_id is resolved by looking up the active record at the configured Parent Level.\n\nEnding a parent auto-ends children recursively.",
|
|
15
|
+
"x": 310,
|
|
16
|
+
"y": 40,
|
|
17
|
+
"wires": []
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"id": "inject-proc-start",
|
|
21
|
+
"type": "inject",
|
|
22
|
+
"z": "isa88-batch-flow",
|
|
23
|
+
"name": "Start Procedure",
|
|
24
|
+
"props": [
|
|
25
|
+
{ "p": "payload", "v": "true", "vt": "bool" },
|
|
26
|
+
{ "p": "batch_id", "v": "BATCH-2024-001", "vt": "str" },
|
|
27
|
+
{ "p": "unit", "v": "Reactor-A", "vt": "str" }
|
|
28
|
+
],
|
|
29
|
+
"repeat": "",
|
|
30
|
+
"crontab": "",
|
|
31
|
+
"once": false,
|
|
32
|
+
"onceDelay": 0.1,
|
|
33
|
+
"x": 140,
|
|
34
|
+
"y": 120,
|
|
35
|
+
"wires": [["batch-procedure"]]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"id": "inject-proc-end",
|
|
39
|
+
"type": "inject",
|
|
40
|
+
"z": "isa88-batch-flow",
|
|
41
|
+
"name": "End Procedure (cascades)",
|
|
42
|
+
"props": [
|
|
43
|
+
{ "p": "payload", "v": "false", "vt": "bool" }
|
|
44
|
+
],
|
|
45
|
+
"repeat": "",
|
|
46
|
+
"crontab": "",
|
|
47
|
+
"once": false,
|
|
48
|
+
"onceDelay": 0.1,
|
|
49
|
+
"x": 160,
|
|
50
|
+
"y": 160,
|
|
51
|
+
"wires": [["batch-procedure"]]
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"id": "batch-procedure",
|
|
55
|
+
"type": "event-frame",
|
|
56
|
+
"z": "isa88-batch-flow",
|
|
57
|
+
"name": "Procedure",
|
|
58
|
+
"level": "procedure",
|
|
59
|
+
"batchName": "Make Product X",
|
|
60
|
+
"batchNameType": "str",
|
|
61
|
+
"unit": "unit",
|
|
62
|
+
"unitType": "msg",
|
|
63
|
+
"batchId": "batch_id",
|
|
64
|
+
"batchIdType": "msg",
|
|
65
|
+
"parentLevel": "",
|
|
66
|
+
"triggerField": "payload",
|
|
67
|
+
"metadataField": "",
|
|
68
|
+
"contextKey": "isa88_batches",
|
|
69
|
+
"endChildren": true,
|
|
70
|
+
"x": 420,
|
|
71
|
+
"y": 140,
|
|
72
|
+
"wires": [["debug-start"], ["debug-end"]]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"id": "inject-unitproc-start",
|
|
76
|
+
"type": "inject",
|
|
77
|
+
"z": "isa88-batch-flow",
|
|
78
|
+
"name": "Start Unit Procedure",
|
|
79
|
+
"props": [
|
|
80
|
+
{ "p": "payload", "v": "true", "vt": "bool" }
|
|
81
|
+
],
|
|
82
|
+
"repeat": "",
|
|
83
|
+
"crontab": "",
|
|
84
|
+
"once": false,
|
|
85
|
+
"onceDelay": 0.1,
|
|
86
|
+
"x": 150,
|
|
87
|
+
"y": 240,
|
|
88
|
+
"wires": [["batch-unit-procedure"]]
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"id": "inject-unitproc-end",
|
|
92
|
+
"type": "inject",
|
|
93
|
+
"z": "isa88-batch-flow",
|
|
94
|
+
"name": "End Unit Procedure",
|
|
95
|
+
"props": [
|
|
96
|
+
{ "p": "payload", "v": "false", "vt": "bool" }
|
|
97
|
+
],
|
|
98
|
+
"repeat": "",
|
|
99
|
+
"crontab": "",
|
|
100
|
+
"once": false,
|
|
101
|
+
"onceDelay": 0.1,
|
|
102
|
+
"x": 150,
|
|
103
|
+
"y": 280,
|
|
104
|
+
"wires": [["batch-unit-procedure"]]
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"id": "batch-unit-procedure",
|
|
108
|
+
"type": "event-frame",
|
|
109
|
+
"z": "isa88-batch-flow",
|
|
110
|
+
"name": "Unit Procedure",
|
|
111
|
+
"level": "unit_procedure",
|
|
112
|
+
"batchName": "Reaction Step",
|
|
113
|
+
"batchNameType": "str",
|
|
114
|
+
"unit": "",
|
|
115
|
+
"unitType": "str",
|
|
116
|
+
"batchId": "",
|
|
117
|
+
"batchIdType": "str",
|
|
118
|
+
"parentLevel": "procedure",
|
|
119
|
+
"triggerField": "payload",
|
|
120
|
+
"metadataField": "",
|
|
121
|
+
"contextKey": "isa88_batches",
|
|
122
|
+
"endChildren": true,
|
|
123
|
+
"x": 430,
|
|
124
|
+
"y": 260,
|
|
125
|
+
"wires": [["debug-start"], ["debug-end"]]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"id": "inject-op-start",
|
|
129
|
+
"type": "inject",
|
|
130
|
+
"z": "isa88-batch-flow",
|
|
131
|
+
"name": "Start Operation",
|
|
132
|
+
"props": [
|
|
133
|
+
{ "p": "payload", "v": "true", "vt": "bool" }
|
|
134
|
+
],
|
|
135
|
+
"repeat": "",
|
|
136
|
+
"crontab": "",
|
|
137
|
+
"once": false,
|
|
138
|
+
"onceDelay": 0.1,
|
|
139
|
+
"x": 140,
|
|
140
|
+
"y": 360,
|
|
141
|
+
"wires": [["batch-operation"]]
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"id": "inject-op-end",
|
|
145
|
+
"type": "inject",
|
|
146
|
+
"z": "isa88-batch-flow",
|
|
147
|
+
"name": "End Operation",
|
|
148
|
+
"props": [
|
|
149
|
+
{ "p": "payload", "v": "false", "vt": "bool" }
|
|
150
|
+
],
|
|
151
|
+
"repeat": "",
|
|
152
|
+
"crontab": "",
|
|
153
|
+
"once": false,
|
|
154
|
+
"onceDelay": 0.1,
|
|
155
|
+
"x": 140,
|
|
156
|
+
"y": 400,
|
|
157
|
+
"wires": [["batch-operation"]]
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"id": "batch-operation",
|
|
161
|
+
"type": "event-frame",
|
|
162
|
+
"z": "isa88-batch-flow",
|
|
163
|
+
"name": "Operation",
|
|
164
|
+
"level": "operation",
|
|
165
|
+
"batchName": "Mixing",
|
|
166
|
+
"batchNameType": "str",
|
|
167
|
+
"unit": "",
|
|
168
|
+
"unitType": "str",
|
|
169
|
+
"batchId": "",
|
|
170
|
+
"batchIdType": "str",
|
|
171
|
+
"parentLevel": "unit_procedure",
|
|
172
|
+
"triggerField": "payload",
|
|
173
|
+
"metadataField": "",
|
|
174
|
+
"contextKey": "isa88_batches",
|
|
175
|
+
"endChildren": true,
|
|
176
|
+
"x": 420,
|
|
177
|
+
"y": 380,
|
|
178
|
+
"wires": [["debug-start"], ["debug-end"]]
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
"id": "inject-phase-start",
|
|
182
|
+
"type": "inject",
|
|
183
|
+
"z": "isa88-batch-flow",
|
|
184
|
+
"name": "Start Phase",
|
|
185
|
+
"props": [
|
|
186
|
+
{ "p": "payload", "v": "true", "vt": "bool" },
|
|
187
|
+
{ "p": "metadata", "v": "{\"speed_rpm\":1500,\"temp_c\":75}", "vt": "json" }
|
|
188
|
+
],
|
|
189
|
+
"repeat": "",
|
|
190
|
+
"crontab": "",
|
|
191
|
+
"once": false,
|
|
192
|
+
"onceDelay": 0.1,
|
|
193
|
+
"x": 130,
|
|
194
|
+
"y": 480,
|
|
195
|
+
"wires": [["batch-phase"]]
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"id": "inject-phase-end",
|
|
199
|
+
"type": "inject",
|
|
200
|
+
"z": "isa88-batch-flow",
|
|
201
|
+
"name": "End Phase",
|
|
202
|
+
"props": [
|
|
203
|
+
{ "p": "payload", "v": "false", "vt": "bool" }
|
|
204
|
+
],
|
|
205
|
+
"repeat": "",
|
|
206
|
+
"crontab": "",
|
|
207
|
+
"once": false,
|
|
208
|
+
"onceDelay": 0.1,
|
|
209
|
+
"x": 130,
|
|
210
|
+
"y": 520,
|
|
211
|
+
"wires": [["batch-phase"]]
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
"id": "batch-phase",
|
|
215
|
+
"type": "event-frame",
|
|
216
|
+
"z": "isa88-batch-flow",
|
|
217
|
+
"name": "Phase",
|
|
218
|
+
"level": "phase",
|
|
219
|
+
"batchName": "Add Ingredient A",
|
|
220
|
+
"batchNameType": "str",
|
|
221
|
+
"unit": "",
|
|
222
|
+
"unitType": "str",
|
|
223
|
+
"batchId": "",
|
|
224
|
+
"batchIdType": "str",
|
|
225
|
+
"parentLevel": "operation",
|
|
226
|
+
"triggerField": "payload",
|
|
227
|
+
"metadataField": "metadata",
|
|
228
|
+
"contextKey": "isa88_batches",
|
|
229
|
+
"endChildren": true,
|
|
230
|
+
"x": 410,
|
|
231
|
+
"y": 500,
|
|
232
|
+
"wires": [["debug-start"], ["debug-end"]]
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"id": "debug-start",
|
|
236
|
+
"type": "debug",
|
|
237
|
+
"z": "isa88-batch-flow",
|
|
238
|
+
"name": "Frame Started",
|
|
239
|
+
"active": true,
|
|
240
|
+
"tosidebar": true,
|
|
241
|
+
"console": false,
|
|
242
|
+
"tostatus": true,
|
|
243
|
+
"complete": "payload",
|
|
244
|
+
"targetType": "msg",
|
|
245
|
+
"statusVal": "payload.level",
|
|
246
|
+
"statusType": "auto",
|
|
247
|
+
"x": 650,
|
|
248
|
+
"y": 280,
|
|
249
|
+
"wires": []
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"id": "debug-end",
|
|
253
|
+
"type": "debug",
|
|
254
|
+
"z": "isa88-batch-flow",
|
|
255
|
+
"name": "Frame Ended",
|
|
256
|
+
"active": true,
|
|
257
|
+
"tosidebar": true,
|
|
258
|
+
"console": false,
|
|
259
|
+
"tostatus": true,
|
|
260
|
+
"complete": "payload",
|
|
261
|
+
"targetType": "msg",
|
|
262
|
+
"statusVal": "payload.level",
|
|
263
|
+
"statusType": "auto",
|
|
264
|
+
"x": 650,
|
|
265
|
+
"y": 400,
|
|
266
|
+
"wires": []
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"id": "comment-instructions",
|
|
270
|
+
"type": "comment",
|
|
271
|
+
"z": "isa88-batch-flow",
|
|
272
|
+
"name": "Start each level independently. End Procedure to cascade-end all. Or end Unit Procedure/Operation/Phase individually.",
|
|
273
|
+
"info": "1. Start Procedure\n2. Start Unit Procedure (auto-links parent_id to Procedure)\n3. Start Operation (auto-links parent_id to Unit Procedure)\n4. Start Phase (auto-links parent_id to Operation)\n5. End Procedure → cascades to Unit Procedure → Operation → Phase\n\nOr end any child individually without affecting the parent.",
|
|
274
|
+
"x": 410,
|
|
275
|
+
"y": 580,
|
|
276
|
+
"wires": []
|
|
277
|
+
}
|
|
278
|
+
]
|