node-red-dashboard-2-hmi 0.1.10 → 0.1.11

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.
@@ -1,639 +1,639 @@
1
- [
2
- {
3
- "id": "ex_est",
4
- "type": "tab",
5
- "label": "IHM esteiras",
6
- "info": "Tela de esteiras com dados simulados. Abra /dashboard/esteira."
7
- },
8
- {
9
- "id": "hx_base",
10
- "type": "ui-base",
11
- "name": "Dashboard",
12
- "path": "/dashboard",
13
- "includeClientData": true,
14
- "acceptsClientConfig": [
15
- "ui-notification",
16
- "ui-control"
17
- ],
18
- "showPathInSidebar": false,
19
- "navigationStyle": "none",
20
- "titleBarStyle": "hidden"
21
- },
22
- {
23
- "id": "hx_theme",
24
- "type": "ui-theme",
25
- "name": "Default",
26
- "colors": {
27
- "surface": "#ffffff",
28
- "primary": "#0094CE",
29
- "bgPage": "#eeeeee",
30
- "groupBg": "#ffffff",
31
- "groupOutline": "#cccccc"
32
- },
33
- "sizes": {
34
- "pagePadding": "12px",
35
- "groupGap": "12px",
36
- "groupBorderRadius": "4px",
37
- "widgetGap": "12px"
38
- }
39
- },
40
- {
41
- "id": "pg_est",
42
- "type": "ui-page",
43
- "name": "Esteiras",
44
- "ui": "hx_base",
45
- "path": "/esteira",
46
- "icon": "factory",
47
- "layout": "grid",
48
- "theme": "hx_theme",
49
- "breakpoints": [
50
- {
51
- "name": "Default",
52
- "px": "0",
53
- "cols": "3"
54
- },
55
- {
56
- "name": "Desktop",
57
- "px": "1024",
58
- "cols": "12"
59
- }
60
- ],
61
- "order": 3,
62
- "visible": "true",
63
- "disabled": "false"
64
- },
65
- {
66
- "id": "est_cmt",
67
- "type": "comment",
68
- "z": "ex_est",
69
- "name": "Simulação a cada 1 s. PARTIR / PARAR são pulsos; clique num motor para o faceplate.",
70
- "info": "",
71
- "x": 330,
72
- "y": 40,
73
- "wires": []
74
- },
75
- {
76
- "id": "est_tick",
77
- "type": "inject",
78
- "z": "ex_est",
79
- "name": "a cada 1 s",
80
- "props": [],
81
- "repeat": "1",
82
- "once": true,
83
- "onceDelay": "1",
84
- "topic": "",
85
- "x": 120,
86
- "y": 120,
87
- "wires": [
88
- [
89
- "est_sim"
90
- ]
91
- ]
92
- },
93
- {
94
- "id": "est_sim",
95
- "type": "function",
96
- "z": "ex_est",
97
- "name": "simula esteiras",
98
- "func": "// Simulação das esteiras. Troque pelos valores do seu CLP.\nconst s = flow.get('sim') || { boas: 0, refugo: 0, t: 0, h: [0, 0, 0] }\nconst cmd = flow.get('cmd') || { rodando: 1, m1: 1, m2: 1, m3: 1, velocidade: 30 }\ns.t++\nconst roda = i => cmd.rodando === 1 && cmd['m' + i] === 1\nconst passa = roda(1) && roda(2) && roda(3) && s.t % 2 === 0\nif (passa) { if (Math.random() < 0.06) s.refugo++; else s.boas++ }\nfor (let i = 0; i < 3; i++) if (roda(i + 1)) s.h[i] += 60\nflow.set('sim', s)\nmsg.payload = {\n boas: s.boas, refugo: s.refugo, meta: 900, velocidade: cmd.velocidade,\n rodando: cmd.rodando, parada: cmd.rodando ? 0 : 1, falha: 0,\n rod1: roda(1) ? 1 : 0, rod2: roda(2) ? 1 : 0, rod3: roda(3) ? 1 : 0,\n falha1: 0, falha2: 0, falha3: 0, modo: 1,\n sp1: passa ? 1 : 0, sp2: roda(2) && s.t % 2 === 1 ? 1 : 0, sp3: passa ? 1 : 0,\n horas1: 3600 * 812 + s.h[0], horas2: 3600 * 640 + s.h[1], horas3: 3600 * 1203 + s.h[2],\n desvio: Math.random() < 0.06 ? 1 : 0,\n h1: 118, h2: 126, h3: 109, h4: 131, h5: 97, h6: Math.floor(s.boas / 2)\n}\nreturn msg",
99
- "outputs": 1,
100
- "x": 290,
101
- "y": 120,
102
- "wires": [
103
- [
104
- "est_canvas"
105
- ]
106
- ]
107
- },
108
- {
109
- "id": "est_canvas",
110
- "type": "ui-hmi-canvas",
111
- "z": "ex_est",
112
- "name": "Esteiras",
113
- "scope": "page",
114
- "page": "pg_est",
115
- "order": 1,
116
- "viewW": 1280,
117
- "viewH": 720,
118
- "theme": "isa101",
119
- "fit": "screen",
120
- "background": "theme",
121
- "offlineAfter": 10,
122
- "locale": "pt-BR",
123
- "alarms": "on",
124
- "alarmsOut": "no",
125
- "symbols": [
126
- {
127
- "id": "e1",
128
- "type": "text",
129
- "x": 20,
130
- "y": 14,
131
- "w": 760,
132
- "h": 32,
133
- "rot": 0,
134
- "key": "",
135
- "props": {
136
- "text": "ESTEIRAS DE EXPEDIÇÃO · {boas} boas · {refugo} refugo",
137
- "size": 20,
138
- "align": "start",
139
- "bold": "yes",
140
- "tone": "normal",
141
- "unit": "",
142
- "decimals": ""
143
- }
144
- },
145
- {
146
- "id": "e2",
147
- "type": "alarmSummary",
148
- "x": 1040,
149
- "y": 10,
150
- "w": 220,
151
- "h": 40,
152
- "rot": 0,
153
- "key": "",
154
- "props": {
155
- "label": ""
156
- }
157
- },
158
- {
159
- "id": "e3",
160
- "type": "stack",
161
- "x": 1220,
162
- "y": 60,
163
- "w": 36,
164
- "h": 130,
165
- "rot": 0,
166
- "key": "",
167
- "props": {
168
- "label": "",
169
- "keyRed": "falha",
170
- "keyYellow": "parada",
171
- "keyGreen": "rodando",
172
- "keyBlue": "",
173
- "blink": "no"
174
- }
175
- },
176
- {
177
- "id": "e4",
178
- "type": "conveyor",
179
- "x": 40,
180
- "y": 200,
181
- "w": 360,
182
- "h": 50,
183
- "rot": 0,
184
- "key": "rod1",
185
- "props": {
186
- "label": "ESTEIRA E1",
187
- "onWhen": "nonzero",
188
- "threshold": 0,
189
- "dir": "fwd",
190
- "faultKey": "falha1",
191
- "priority": "1"
192
- }
193
- },
194
- {
195
- "id": "e5",
196
- "type": "motor",
197
- "x": 180,
198
- "y": 110,
199
- "w": 60,
200
- "h": 60,
201
- "rot": 0,
202
- "key": "rod1",
203
- "props": {
204
- "label": "M1",
205
- "onWhen": "nonzero",
206
- "threshold": 0,
207
- "faultKey": "falha1",
208
- "priority": "1"
209
- },
210
- "action": {
211
- "mode": "faceplate",
212
- "confirm": "yes",
213
- "pin": "no",
214
- "value": "",
215
- "topic": "",
216
- "valueKey": "",
217
- "valueUnit": "",
218
- "modeKey": "modo",
219
- "modeTexts": "0=MANUAL,1=AUTO",
220
- "hoursKey": "",
221
- "startsKey": "",
222
- "onTopic": "cmd/m1",
223
- "onValue": "1",
224
- "offTopic": "cmd/m1",
225
- "offValue": "0",
226
- "resetTopic": "reset",
227
- "resetValue": "1"
228
- }
229
- },
230
- {
231
- "id": "e6",
232
- "type": "sensor",
233
- "x": 340,
234
- "y": 150,
235
- "w": 44,
236
- "h": 44,
237
- "rot": 0,
238
- "key": "sp1",
239
- "props": {
240
- "label": "S1",
241
- "kind": "photo",
242
- "onWhen": "nonzero",
243
- "threshold": 0
244
- }
245
- },
246
- {
247
- "id": "e7",
248
- "type": "counter",
249
- "x": 60,
250
- "y": 300,
251
- "w": 150,
252
- "h": 56,
253
- "rot": 0,
254
- "key": "horas1",
255
- "props": {
256
- "kind": "hours",
257
- "title": "HORAS M1",
258
- "src": "s",
259
- "decimals": 0,
260
- "unit": "",
261
- "label": ""
262
- }
263
- },
264
- {
265
- "id": "e8",
266
- "type": "conveyor",
267
- "x": 440,
268
- "y": 200,
269
- "w": 360,
270
- "h": 50,
271
- "rot": 0,
272
- "key": "rod2",
273
- "props": {
274
- "label": "ESTEIRA E2",
275
- "onWhen": "nonzero",
276
- "threshold": 0,
277
- "dir": "fwd",
278
- "faultKey": "falha2",
279
- "priority": "1"
280
- }
281
- },
282
- {
283
- "id": "e9",
284
- "type": "motor",
285
- "x": 580,
286
- "y": 110,
287
- "w": 60,
288
- "h": 60,
289
- "rot": 0,
290
- "key": "rod2",
291
- "props": {
292
- "label": "M2",
293
- "onWhen": "nonzero",
294
- "threshold": 0,
295
- "faultKey": "falha2",
296
- "priority": "1"
297
- },
298
- "action": {
299
- "mode": "faceplate",
300
- "confirm": "yes",
301
- "pin": "no",
302
- "value": "",
303
- "topic": "",
304
- "valueKey": "",
305
- "valueUnit": "",
306
- "modeKey": "modo",
307
- "modeTexts": "0=MANUAL,1=AUTO",
308
- "hoursKey": "",
309
- "startsKey": "",
310
- "onTopic": "cmd/m2",
311
- "onValue": "1",
312
- "offTopic": "cmd/m2",
313
- "offValue": "0",
314
- "resetTopic": "reset",
315
- "resetValue": "1"
316
- }
317
- },
318
- {
319
- "id": "e10",
320
- "type": "sensor",
321
- "x": 740,
322
- "y": 150,
323
- "w": 44,
324
- "h": 44,
325
- "rot": 0,
326
- "key": "sp2",
327
- "props": {
328
- "label": "S2",
329
- "kind": "photo",
330
- "onWhen": "nonzero",
331
- "threshold": 0
332
- }
333
- },
334
- {
335
- "id": "e11",
336
- "type": "counter",
337
- "x": 460,
338
- "y": 300,
339
- "w": 150,
340
- "h": 56,
341
- "rot": 0,
342
- "key": "horas2",
343
- "props": {
344
- "kind": "hours",
345
- "title": "HORAS M2",
346
- "src": "s",
347
- "decimals": 0,
348
- "unit": "",
349
- "label": ""
350
- }
351
- },
352
- {
353
- "id": "e12",
354
- "type": "conveyor",
355
- "x": 840,
356
- "y": 200,
357
- "w": 360,
358
- "h": 50,
359
- "rot": 0,
360
- "key": "rod3",
361
- "props": {
362
- "label": "ESTEIRA E3",
363
- "onWhen": "nonzero",
364
- "threshold": 0,
365
- "dir": "fwd",
366
- "faultKey": "falha3",
367
- "priority": "1"
368
- }
369
- },
370
- {
371
- "id": "e13",
372
- "type": "motor",
373
- "x": 980,
374
- "y": 110,
375
- "w": 60,
376
- "h": 60,
377
- "rot": 0,
378
- "key": "rod3",
379
- "props": {
380
- "label": "M3",
381
- "onWhen": "nonzero",
382
- "threshold": 0,
383
- "faultKey": "falha3",
384
- "priority": "1"
385
- },
386
- "action": {
387
- "mode": "faceplate",
388
- "confirm": "yes",
389
- "pin": "no",
390
- "value": "",
391
- "topic": "",
392
- "valueKey": "",
393
- "valueUnit": "",
394
- "modeKey": "modo",
395
- "modeTexts": "0=MANUAL,1=AUTO",
396
- "hoursKey": "",
397
- "startsKey": "",
398
- "onTopic": "cmd/m3",
399
- "onValue": "1",
400
- "offTopic": "cmd/m3",
401
- "offValue": "0",
402
- "resetTopic": "reset",
403
- "resetValue": "1"
404
- }
405
- },
406
- {
407
- "id": "e14",
408
- "type": "sensor",
409
- "x": 1140,
410
- "y": 150,
411
- "w": 44,
412
- "h": 44,
413
- "rot": 0,
414
- "key": "sp3",
415
- "props": {
416
- "label": "S3",
417
- "kind": "photo",
418
- "onWhen": "nonzero",
419
- "threshold": 0
420
- }
421
- },
422
- {
423
- "id": "e15",
424
- "type": "counter",
425
- "x": 860,
426
- "y": 300,
427
- "w": 150,
428
- "h": 56,
429
- "rot": 0,
430
- "key": "horas3",
431
- "props": {
432
- "kind": "hours",
433
- "title": "HORAS M3",
434
- "src": "s",
435
- "decimals": 0,
436
- "unit": "",
437
- "label": ""
438
- }
439
- },
440
- {
441
- "id": "e16",
442
- "type": "cylinder",
443
- "x": 1100,
444
- "y": 310,
445
- "w": 140,
446
- "h": 36,
447
- "rot": 0,
448
- "key": "desvio",
449
- "props": {
450
- "label": "DESVIO REFUGO",
451
- "onWhen": "nonzero",
452
- "threshold": 0
453
- }
454
- },
455
- {
456
- "id": "e17",
457
- "type": "button",
458
- "x": 40,
459
- "y": 388,
460
- "w": 140,
461
- "h": 44,
462
- "rot": 0,
463
- "key": "rodando",
464
- "props": {
465
- "text": "PARTIR",
466
- "textOn": "RODANDO",
467
- "onWhen": "nonzero",
468
- "threshold": 0
469
- },
470
- "action": {
471
- "mode": "pulse",
472
- "value": "",
473
- "topic": "cmd/partir",
474
- "confirm": "no",
475
- "pin": "no"
476
- }
477
- },
478
- {
479
- "id": "e18",
480
- "type": "button",
481
- "x": 200,
482
- "y": 388,
483
- "w": 140,
484
- "h": 44,
485
- "rot": 0,
486
- "key": "parada",
487
- "props": {
488
- "text": "PARAR",
489
- "textOn": "",
490
- "onWhen": "nonzero",
491
- "threshold": 0
492
- },
493
- "action": {
494
- "mode": "pulse",
495
- "value": "",
496
- "topic": "cmd/parar",
497
- "confirm": "no",
498
- "pin": "no"
499
- }
500
- },
501
- {
502
- "id": "e19",
503
- "type": "setpoint",
504
- "x": 360,
505
- "y": 378,
506
- "w": 170,
507
- "h": 64,
508
- "rot": 0,
509
- "key": "velocidade",
510
- "props": {
511
- "title": "VELOCIDADE",
512
- "unit": "m/min",
513
- "decimals": 0
514
- },
515
- "action": {
516
- "mode": "input",
517
- "value": "",
518
- "topic": "cmd/velocidade",
519
- "confirm": "yes",
520
- "pin": "no",
521
- "min": "5",
522
- "max": "60"
523
- }
524
- },
525
- {
526
- "id": "e20",
527
- "type": "kpi",
528
- "x": 20,
529
- "y": 460,
530
- "w": 300,
531
- "h": 120,
532
- "rot": 0,
533
- "key": "boas",
534
- "props": {
535
- "title": "CAIXAS BOAS HOJE",
536
- "unit": "",
537
- "decimals": 0,
538
- "subtitle": "Meta {meta} caixas"
539
- }
540
- },
541
- {
542
- "id": "e21",
543
- "type": "donut",
544
- "x": 340,
545
- "y": 460,
546
- "w": 360,
547
- "h": 120,
548
- "rot": 0,
549
- "key": "",
550
- "props": {
551
- "title": "QUALIDADE",
552
- "series": "boas:Boas, refugo:Refugo",
553
- "labels": "",
554
- "unit": "",
555
- "decimals": 0,
556
- "legend": "yes",
557
- "center": "total"
558
- }
559
- },
560
- {
561
- "id": "e22",
562
- "type": "barChart",
563
- "x": 720,
564
- "y": 460,
565
- "w": 540,
566
- "h": 120,
567
- "rot": 0,
568
- "key": "",
569
- "props": {
570
- "title": "CAIXAS POR HORA",
571
- "series": "h1:6h, h2:7h, h3:8h, h4:9h, h5:10h, h6:11h",
572
- "labels": "",
573
- "unit": "",
574
- "decimals": 0,
575
- "max": "",
576
- "goal": 120,
577
- "lowColor": "warn"
578
- }
579
- },
580
- {
581
- "id": "e23",
582
- "type": "alarmList",
583
- "x": 20,
584
- "y": 590,
585
- "w": 1240,
586
- "h": 120,
587
- "rot": 0,
588
- "key": "",
589
- "props": {
590
- "title": "ALARMES",
591
- "rowHeight": 26,
592
- "tab": "active",
593
- "shelve": "yes",
594
- "shelveMinutes": 30
595
- }
596
- }
597
- ],
598
- "outputs": 1,
599
- "x": 460,
600
- "y": 120,
601
- "wires": [
602
- [
603
- "est_cmd"
604
- ]
605
- ]
606
- },
607
- {
608
- "id": "est_cmd",
609
- "type": "function",
610
- "z": "ex_est",
611
- "name": "aplica comando",
612
- "func": "// Comandos da tela. Aqui só mudam a simulação; no seu flow ligue a saída no CLP.\nconst cmd = flow.get('cmd') || { rodando: 1, m1: 1, m2: 1, m3: 1, velocidade: 30 }\nconst on = Number(msg.payload) ? 1 : 0\nif (msg.topic === 'cmd/partir' && on) cmd.rodando = 1\nif (msg.topic === 'cmd/parar' && on) cmd.rodando = 0\nif (msg.topic === 'cmd/velocidade') cmd.velocidade = Number(msg.payload)\nconst m = /^cmd\\/m(\\d)$/.exec(msg.topic || '')\nif (m) cmd['m' + m[1]] = on\nflow.set('cmd', cmd)\nreturn msg",
613
- "outputs": 1,
614
- "x": 660,
615
- "y": 120,
616
- "wires": [
617
- [
618
- "est_dbg"
619
- ]
620
- ]
621
- },
622
- {
623
- "id": "est_dbg",
624
- "type": "debug",
625
- "z": "ex_est",
626
- "name": "comandos",
627
- "active": true,
628
- "tosidebar": true,
629
- "console": false,
630
- "tostatus": true,
631
- "complete": "true",
632
- "targetType": "full",
633
- "statusVal": "topic",
634
- "statusType": "auto",
635
- "x": 850,
636
- "y": 120,
637
- "wires": []
638
- }
639
- ]
1
+ [
2
+ {
3
+ "id": "ex_est",
4
+ "type": "tab",
5
+ "label": "IHM esteiras",
6
+ "info": "Tela de esteiras com dados simulados. Abra /dashboard/esteira."
7
+ },
8
+ {
9
+ "id": "hx_base",
10
+ "type": "ui-base",
11
+ "name": "Dashboard",
12
+ "path": "/dashboard",
13
+ "includeClientData": true,
14
+ "acceptsClientConfig": [
15
+ "ui-notification",
16
+ "ui-control"
17
+ ],
18
+ "showPathInSidebar": false,
19
+ "navigationStyle": "none",
20
+ "titleBarStyle": "hidden"
21
+ },
22
+ {
23
+ "id": "hx_theme",
24
+ "type": "ui-theme",
25
+ "name": "Default",
26
+ "colors": {
27
+ "surface": "#ffffff",
28
+ "primary": "#0094CE",
29
+ "bgPage": "#eeeeee",
30
+ "groupBg": "#ffffff",
31
+ "groupOutline": "#cccccc"
32
+ },
33
+ "sizes": {
34
+ "pagePadding": "12px",
35
+ "groupGap": "12px",
36
+ "groupBorderRadius": "4px",
37
+ "widgetGap": "12px"
38
+ }
39
+ },
40
+ {
41
+ "id": "pg_est",
42
+ "type": "ui-page",
43
+ "name": "Esteiras",
44
+ "ui": "hx_base",
45
+ "path": "/esteira",
46
+ "icon": "factory",
47
+ "layout": "grid",
48
+ "theme": "hx_theme",
49
+ "breakpoints": [
50
+ {
51
+ "name": "Default",
52
+ "px": "0",
53
+ "cols": "3"
54
+ },
55
+ {
56
+ "name": "Desktop",
57
+ "px": "1024",
58
+ "cols": "12"
59
+ }
60
+ ],
61
+ "order": 3,
62
+ "visible": "true",
63
+ "disabled": "false"
64
+ },
65
+ {
66
+ "id": "est_cmt",
67
+ "type": "comment",
68
+ "z": "ex_est",
69
+ "name": "Simulação a cada 1 s. PARTIR / PARAR são pulsos; clique num motor para o faceplate.",
70
+ "info": "",
71
+ "x": 330,
72
+ "y": 40,
73
+ "wires": []
74
+ },
75
+ {
76
+ "id": "est_tick",
77
+ "type": "inject",
78
+ "z": "ex_est",
79
+ "name": "a cada 1 s",
80
+ "props": [],
81
+ "repeat": "1",
82
+ "once": true,
83
+ "onceDelay": "1",
84
+ "topic": "",
85
+ "x": 120,
86
+ "y": 120,
87
+ "wires": [
88
+ [
89
+ "est_sim"
90
+ ]
91
+ ]
92
+ },
93
+ {
94
+ "id": "est_sim",
95
+ "type": "function",
96
+ "z": "ex_est",
97
+ "name": "simula esteiras",
98
+ "func": "// Simulação das esteiras. Troque pelos valores do seu CLP.\nconst s = flow.get('sim') || { boas: 0, refugo: 0, t: 0, h: [0, 0, 0] }\nconst cmd = flow.get('cmd') || { rodando: 1, m1: 1, m2: 1, m3: 1, velocidade: 30 }\ns.t++\nconst roda = i => cmd.rodando === 1 && cmd['m' + i] === 1\nconst passa = roda(1) && roda(2) && roda(3) && s.t % 2 === 0\nif (passa) { if (Math.random() < 0.06) s.refugo++; else s.boas++ }\nfor (let i = 0; i < 3; i++) if (roda(i + 1)) s.h[i] += 60\nflow.set('sim', s)\nmsg.payload = {\n boas: s.boas, refugo: s.refugo, meta: 900, velocidade: cmd.velocidade,\n rodando: cmd.rodando, parada: cmd.rodando ? 0 : 1, falha: 0,\n rod1: roda(1) ? 1 : 0, rod2: roda(2) ? 1 : 0, rod3: roda(3) ? 1 : 0,\n falha1: 0, falha2: 0, falha3: 0, modo: 1,\n sp1: passa ? 1 : 0, sp2: roda(2) && s.t % 2 === 1 ? 1 : 0, sp3: passa ? 1 : 0,\n horas1: 3600 * 812 + s.h[0], horas2: 3600 * 640 + s.h[1], horas3: 3600 * 1203 + s.h[2],\n desvio: Math.random() < 0.06 ? 1 : 0,\n h1: 118, h2: 126, h3: 109, h4: 131, h5: 97, h6: Math.floor(s.boas / 2)\n}\nreturn msg",
99
+ "outputs": 1,
100
+ "x": 290,
101
+ "y": 120,
102
+ "wires": [
103
+ [
104
+ "est_canvas"
105
+ ]
106
+ ]
107
+ },
108
+ {
109
+ "id": "est_canvas",
110
+ "type": "ui-hmi-canvas",
111
+ "z": "ex_est",
112
+ "name": "Esteiras",
113
+ "scope": "page",
114
+ "page": "pg_est",
115
+ "order": 1,
116
+ "viewW": 1280,
117
+ "viewH": 720,
118
+ "theme": "isa101",
119
+ "fit": "screen",
120
+ "background": "theme",
121
+ "offlineAfter": 10,
122
+ "locale": "pt-BR",
123
+ "alarms": "on",
124
+ "alarmsOut": "no",
125
+ "symbols": [
126
+ {
127
+ "id": "e1",
128
+ "type": "text",
129
+ "x": 20,
130
+ "y": 14,
131
+ "w": 760,
132
+ "h": 32,
133
+ "rot": 0,
134
+ "key": "",
135
+ "props": {
136
+ "text": "ESTEIRAS DE EXPEDIÇÃO · {boas} boas · {refugo} refugo",
137
+ "size": 20,
138
+ "align": "start",
139
+ "bold": "yes",
140
+ "tone": "normal",
141
+ "unit": "",
142
+ "decimals": ""
143
+ }
144
+ },
145
+ {
146
+ "id": "e2",
147
+ "type": "alarmSummary",
148
+ "x": 1040,
149
+ "y": 10,
150
+ "w": 220,
151
+ "h": 40,
152
+ "rot": 0,
153
+ "key": "",
154
+ "props": {
155
+ "label": ""
156
+ }
157
+ },
158
+ {
159
+ "id": "e3",
160
+ "type": "stack",
161
+ "x": 1220,
162
+ "y": 60,
163
+ "w": 36,
164
+ "h": 130,
165
+ "rot": 0,
166
+ "key": "",
167
+ "props": {
168
+ "label": "",
169
+ "keyRed": "falha",
170
+ "keyYellow": "parada",
171
+ "keyGreen": "rodando",
172
+ "keyBlue": "",
173
+ "blink": "no"
174
+ }
175
+ },
176
+ {
177
+ "id": "e4",
178
+ "type": "conveyor",
179
+ "x": 40,
180
+ "y": 200,
181
+ "w": 360,
182
+ "h": 50,
183
+ "rot": 0,
184
+ "key": "rod1",
185
+ "props": {
186
+ "label": "ESTEIRA E1",
187
+ "onWhen": "nonzero",
188
+ "threshold": 0,
189
+ "dir": "fwd",
190
+ "faultKey": "falha1",
191
+ "priority": "1"
192
+ }
193
+ },
194
+ {
195
+ "id": "e5",
196
+ "type": "motor",
197
+ "x": 180,
198
+ "y": 110,
199
+ "w": 60,
200
+ "h": 60,
201
+ "rot": 0,
202
+ "key": "rod1",
203
+ "props": {
204
+ "label": "M1",
205
+ "onWhen": "nonzero",
206
+ "threshold": 0,
207
+ "faultKey": "falha1",
208
+ "priority": "1"
209
+ },
210
+ "action": {
211
+ "mode": "faceplate",
212
+ "confirm": "yes",
213
+ "pin": "no",
214
+ "value": "",
215
+ "topic": "",
216
+ "valueKey": "",
217
+ "valueUnit": "",
218
+ "modeKey": "modo",
219
+ "modeTexts": "0=MANUAL,1=AUTO",
220
+ "hoursKey": "",
221
+ "startsKey": "",
222
+ "onTopic": "cmd/m1",
223
+ "onValue": "1",
224
+ "offTopic": "cmd/m1",
225
+ "offValue": "0",
226
+ "resetTopic": "reset",
227
+ "resetValue": "1"
228
+ }
229
+ },
230
+ {
231
+ "id": "e6",
232
+ "type": "sensor",
233
+ "x": 340,
234
+ "y": 150,
235
+ "w": 44,
236
+ "h": 44,
237
+ "rot": 0,
238
+ "key": "sp1",
239
+ "props": {
240
+ "label": "S1",
241
+ "kind": "photo",
242
+ "onWhen": "nonzero",
243
+ "threshold": 0
244
+ }
245
+ },
246
+ {
247
+ "id": "e7",
248
+ "type": "counter",
249
+ "x": 60,
250
+ "y": 300,
251
+ "w": 150,
252
+ "h": 56,
253
+ "rot": 0,
254
+ "key": "horas1",
255
+ "props": {
256
+ "kind": "hours",
257
+ "title": "HORAS M1",
258
+ "src": "s",
259
+ "decimals": 0,
260
+ "unit": "",
261
+ "label": ""
262
+ }
263
+ },
264
+ {
265
+ "id": "e8",
266
+ "type": "conveyor",
267
+ "x": 440,
268
+ "y": 200,
269
+ "w": 360,
270
+ "h": 50,
271
+ "rot": 0,
272
+ "key": "rod2",
273
+ "props": {
274
+ "label": "ESTEIRA E2",
275
+ "onWhen": "nonzero",
276
+ "threshold": 0,
277
+ "dir": "fwd",
278
+ "faultKey": "falha2",
279
+ "priority": "1"
280
+ }
281
+ },
282
+ {
283
+ "id": "e9",
284
+ "type": "motor",
285
+ "x": 580,
286
+ "y": 110,
287
+ "w": 60,
288
+ "h": 60,
289
+ "rot": 0,
290
+ "key": "rod2",
291
+ "props": {
292
+ "label": "M2",
293
+ "onWhen": "nonzero",
294
+ "threshold": 0,
295
+ "faultKey": "falha2",
296
+ "priority": "1"
297
+ },
298
+ "action": {
299
+ "mode": "faceplate",
300
+ "confirm": "yes",
301
+ "pin": "no",
302
+ "value": "",
303
+ "topic": "",
304
+ "valueKey": "",
305
+ "valueUnit": "",
306
+ "modeKey": "modo",
307
+ "modeTexts": "0=MANUAL,1=AUTO",
308
+ "hoursKey": "",
309
+ "startsKey": "",
310
+ "onTopic": "cmd/m2",
311
+ "onValue": "1",
312
+ "offTopic": "cmd/m2",
313
+ "offValue": "0",
314
+ "resetTopic": "reset",
315
+ "resetValue": "1"
316
+ }
317
+ },
318
+ {
319
+ "id": "e10",
320
+ "type": "sensor",
321
+ "x": 740,
322
+ "y": 150,
323
+ "w": 44,
324
+ "h": 44,
325
+ "rot": 0,
326
+ "key": "sp2",
327
+ "props": {
328
+ "label": "S2",
329
+ "kind": "photo",
330
+ "onWhen": "nonzero",
331
+ "threshold": 0
332
+ }
333
+ },
334
+ {
335
+ "id": "e11",
336
+ "type": "counter",
337
+ "x": 460,
338
+ "y": 300,
339
+ "w": 150,
340
+ "h": 56,
341
+ "rot": 0,
342
+ "key": "horas2",
343
+ "props": {
344
+ "kind": "hours",
345
+ "title": "HORAS M2",
346
+ "src": "s",
347
+ "decimals": 0,
348
+ "unit": "",
349
+ "label": ""
350
+ }
351
+ },
352
+ {
353
+ "id": "e12",
354
+ "type": "conveyor",
355
+ "x": 840,
356
+ "y": 200,
357
+ "w": 360,
358
+ "h": 50,
359
+ "rot": 0,
360
+ "key": "rod3",
361
+ "props": {
362
+ "label": "ESTEIRA E3",
363
+ "onWhen": "nonzero",
364
+ "threshold": 0,
365
+ "dir": "fwd",
366
+ "faultKey": "falha3",
367
+ "priority": "1"
368
+ }
369
+ },
370
+ {
371
+ "id": "e13",
372
+ "type": "motor",
373
+ "x": 980,
374
+ "y": 110,
375
+ "w": 60,
376
+ "h": 60,
377
+ "rot": 0,
378
+ "key": "rod3",
379
+ "props": {
380
+ "label": "M3",
381
+ "onWhen": "nonzero",
382
+ "threshold": 0,
383
+ "faultKey": "falha3",
384
+ "priority": "1"
385
+ },
386
+ "action": {
387
+ "mode": "faceplate",
388
+ "confirm": "yes",
389
+ "pin": "no",
390
+ "value": "",
391
+ "topic": "",
392
+ "valueKey": "",
393
+ "valueUnit": "",
394
+ "modeKey": "modo",
395
+ "modeTexts": "0=MANUAL,1=AUTO",
396
+ "hoursKey": "",
397
+ "startsKey": "",
398
+ "onTopic": "cmd/m3",
399
+ "onValue": "1",
400
+ "offTopic": "cmd/m3",
401
+ "offValue": "0",
402
+ "resetTopic": "reset",
403
+ "resetValue": "1"
404
+ }
405
+ },
406
+ {
407
+ "id": "e14",
408
+ "type": "sensor",
409
+ "x": 1140,
410
+ "y": 150,
411
+ "w": 44,
412
+ "h": 44,
413
+ "rot": 0,
414
+ "key": "sp3",
415
+ "props": {
416
+ "label": "S3",
417
+ "kind": "photo",
418
+ "onWhen": "nonzero",
419
+ "threshold": 0
420
+ }
421
+ },
422
+ {
423
+ "id": "e15",
424
+ "type": "counter",
425
+ "x": 860,
426
+ "y": 300,
427
+ "w": 150,
428
+ "h": 56,
429
+ "rot": 0,
430
+ "key": "horas3",
431
+ "props": {
432
+ "kind": "hours",
433
+ "title": "HORAS M3",
434
+ "src": "s",
435
+ "decimals": 0,
436
+ "unit": "",
437
+ "label": ""
438
+ }
439
+ },
440
+ {
441
+ "id": "e16",
442
+ "type": "cylinder",
443
+ "x": 1100,
444
+ "y": 310,
445
+ "w": 140,
446
+ "h": 36,
447
+ "rot": 0,
448
+ "key": "desvio",
449
+ "props": {
450
+ "label": "DESVIO REFUGO",
451
+ "onWhen": "nonzero",
452
+ "threshold": 0
453
+ }
454
+ },
455
+ {
456
+ "id": "e17",
457
+ "type": "button",
458
+ "x": 40,
459
+ "y": 388,
460
+ "w": 140,
461
+ "h": 44,
462
+ "rot": 0,
463
+ "key": "rodando",
464
+ "props": {
465
+ "text": "PARTIR",
466
+ "textOn": "RODANDO",
467
+ "onWhen": "nonzero",
468
+ "threshold": 0
469
+ },
470
+ "action": {
471
+ "mode": "pulse",
472
+ "value": "",
473
+ "topic": "cmd/partir",
474
+ "confirm": "no",
475
+ "pin": "no"
476
+ }
477
+ },
478
+ {
479
+ "id": "e18",
480
+ "type": "button",
481
+ "x": 200,
482
+ "y": 388,
483
+ "w": 140,
484
+ "h": 44,
485
+ "rot": 0,
486
+ "key": "parada",
487
+ "props": {
488
+ "text": "PARAR",
489
+ "textOn": "",
490
+ "onWhen": "nonzero",
491
+ "threshold": 0
492
+ },
493
+ "action": {
494
+ "mode": "pulse",
495
+ "value": "",
496
+ "topic": "cmd/parar",
497
+ "confirm": "no",
498
+ "pin": "no"
499
+ }
500
+ },
501
+ {
502
+ "id": "e19",
503
+ "type": "setpoint",
504
+ "x": 360,
505
+ "y": 378,
506
+ "w": 170,
507
+ "h": 64,
508
+ "rot": 0,
509
+ "key": "velocidade",
510
+ "props": {
511
+ "title": "VELOCIDADE",
512
+ "unit": "m/min",
513
+ "decimals": 0
514
+ },
515
+ "action": {
516
+ "mode": "input",
517
+ "value": "",
518
+ "topic": "cmd/velocidade",
519
+ "confirm": "yes",
520
+ "pin": "no",
521
+ "min": "5",
522
+ "max": "60"
523
+ }
524
+ },
525
+ {
526
+ "id": "e20",
527
+ "type": "kpi",
528
+ "x": 20,
529
+ "y": 460,
530
+ "w": 300,
531
+ "h": 120,
532
+ "rot": 0,
533
+ "key": "boas",
534
+ "props": {
535
+ "title": "CAIXAS BOAS HOJE",
536
+ "unit": "",
537
+ "decimals": 0,
538
+ "subtitle": "Meta {meta} caixas"
539
+ }
540
+ },
541
+ {
542
+ "id": "e21",
543
+ "type": "donut",
544
+ "x": 340,
545
+ "y": 460,
546
+ "w": 360,
547
+ "h": 120,
548
+ "rot": 0,
549
+ "key": "",
550
+ "props": {
551
+ "title": "QUALIDADE",
552
+ "series": "boas:Boas, refugo:Refugo",
553
+ "labels": "",
554
+ "unit": "",
555
+ "decimals": 0,
556
+ "legend": "yes",
557
+ "center": "total"
558
+ }
559
+ },
560
+ {
561
+ "id": "e22",
562
+ "type": "barChart",
563
+ "x": 720,
564
+ "y": 460,
565
+ "w": 540,
566
+ "h": 120,
567
+ "rot": 0,
568
+ "key": "",
569
+ "props": {
570
+ "title": "CAIXAS POR HORA",
571
+ "series": "h1:6h, h2:7h, h3:8h, h4:9h, h5:10h, h6:11h",
572
+ "labels": "",
573
+ "unit": "",
574
+ "decimals": 0,
575
+ "max": "",
576
+ "goal": 120,
577
+ "lowColor": "warn"
578
+ }
579
+ },
580
+ {
581
+ "id": "e23",
582
+ "type": "alarmList",
583
+ "x": 20,
584
+ "y": 590,
585
+ "w": 1240,
586
+ "h": 120,
587
+ "rot": 0,
588
+ "key": "",
589
+ "props": {
590
+ "title": "ALARMES",
591
+ "rowHeight": 26,
592
+ "tab": "active",
593
+ "shelve": "yes",
594
+ "shelveMinutes": 30
595
+ }
596
+ }
597
+ ],
598
+ "outputs": 1,
599
+ "x": 460,
600
+ "y": 120,
601
+ "wires": [
602
+ [
603
+ "est_cmd"
604
+ ]
605
+ ]
606
+ },
607
+ {
608
+ "id": "est_cmd",
609
+ "type": "function",
610
+ "z": "ex_est",
611
+ "name": "aplica comando",
612
+ "func": "// Comandos da tela. Aqui só mudam a simulação; no seu flow ligue a saída no CLP.\nconst cmd = flow.get('cmd') || { rodando: 1, m1: 1, m2: 1, m3: 1, velocidade: 30 }\nconst on = Number(msg.payload) ? 1 : 0\nif (msg.topic === 'cmd/partir' && on) cmd.rodando = 1\nif (msg.topic === 'cmd/parar' && on) cmd.rodando = 0\nif (msg.topic === 'cmd/velocidade') cmd.velocidade = Number(msg.payload)\nconst m = /^cmd\\/m(\\d)$/.exec(msg.topic || '')\nif (m) cmd['m' + m[1]] = on\nflow.set('cmd', cmd)\nreturn msg",
613
+ "outputs": 1,
614
+ "x": 660,
615
+ "y": 120,
616
+ "wires": [
617
+ [
618
+ "est_dbg"
619
+ ]
620
+ ]
621
+ },
622
+ {
623
+ "id": "est_dbg",
624
+ "type": "debug",
625
+ "z": "ex_est",
626
+ "name": "comandos",
627
+ "active": true,
628
+ "tosidebar": true,
629
+ "console": false,
630
+ "tostatus": true,
631
+ "complete": "true",
632
+ "targetType": "full",
633
+ "statusVal": "topic",
634
+ "statusType": "auto",
635
+ "x": 850,
636
+ "y": 120,
637
+ "wires": []
638
+ }
639
+ ]