Skip to content

Commit a830bfa

Browse files
authored
Merge pull request #16 from leon-chatelain/main
VFC Dashboard getting started & Write Location data to Asset
2 parents 6915109 + 1b5c16c commit a830bfa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+2426
-0
lines changed

Dashboard_getting_started/Resources/IMPORT_Dashboard.json

Lines changed: 1213 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 271 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,271 @@
1+
[
2+
{
3+
"id": "92f8b622.df2838",
4+
"type": "comment",
5+
"z": "42c6ce94.a9202",
6+
"name": "Get Random Functions",
7+
"info": "function getRandomDouble(min, max) {\n return (Math.random() * (max - min) + min).toString();\n}\nfunction getRandomInt(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return (Math.floor(Math.random() * (max - min + 1)) + min).toString();\n}\n",
8+
"sticky": 1,
9+
"x": 300,
10+
"y": 680,
11+
"wires": []
12+
},
13+
{
14+
"id": "56f3fb32.1321b4",
15+
"type": "comment",
16+
"z": "42c6ce94.a9202",
17+
"name": "Basic Machine",
18+
"info": "",
19+
"sticky": 0,
20+
"x": 410,
21+
"y": 80,
22+
"wires": []
23+
},
24+
{
25+
"id": "cd612bbe.c1cd68",
26+
"type": "comment",
27+
"z": "42c6ce94.a9202",
28+
"name": "Performance Machine",
29+
"info": "",
30+
"sticky": 0,
31+
"x": 440,
32+
"y": 240,
33+
"wires": []
34+
},
35+
{
36+
"id": "5216b1db.909bc",
37+
"type": "comment",
38+
"z": "42c6ce94.a9202",
39+
"name": "Eco Machine",
40+
"info": "",
41+
"sticky": 0,
42+
"x": 410,
43+
"y": 400,
44+
"wires": []
45+
},
46+
{
47+
"id": "cc846ce2.eef4a",
48+
"type": "function",
49+
"z": "42c6ce94.a9202",
50+
"name": "Basic Machine Status",
51+
"func": "function getRandomInt(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return (Math.floor(Math.random() * (max - min + 1)) + min).toString();\n}\n\nlet programList = [\"EDS TTU 553 V8\",\"PA12 - KKT Vorheizen\",\"TC 3D AKF PA11\",\"detax v30\",\"Tool changing position\",\"EDS PT 3404 Balanced\",\"Postprocessing\", \"PT Black TL l-R\", \"PT White FT\", \"Preprocessing\", \"Cleaning\", \"PT M FT L-R\"];\n\nlet progr = programList[Math.floor(Math.random() * programList.length)];\nvar stat = getRandomInt(1,5);\nvar id = getRandomInt(1000,9999999);\n\nvar obj = {};\nobj._time = new Date();\nobj.Machine_Status = stat;\nobj.Program_Id = id;\nobj.Program_Name = progr;\n\nmsg.payload = obj;\nreturn msg;",
52+
"outputs": 1,
53+
"language": "javascript",
54+
"noerr": 0,
55+
"x": 440,
56+
"y": 120,
57+
"wires": [
58+
[
59+
"7f529f86.7fc4e"
60+
]
61+
]
62+
},
63+
{
64+
"id": "c5716581.b7e138",
65+
"type": "function",
66+
"z": "42c6ce94.a9202",
67+
"name": "Basic Machine Sensors",
68+
"func": "function getRandomDouble(min, max) {\n return (Math.random() * (max - min) + min).toString();\n}\nfunction getRandomInt(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return (Math.floor(Math.random() * (max - min + 1)) + min).toString();\n}\nvar temp_pre = getRandomInt(80,100) + getRandomDouble(10,30);\nvar temp_work = getRandomInt(120,140) + getRandomDouble(10,60);\nvar press_pre = getRandomInt(10,20) + getRandomDouble(2,7);\nvar press_work = getRandomInt(2,5) + getRandomDouble(2,7);\n\nvar obj = {};\nobj._time = new Date();\nobj.Pressure_Preheater = press_pre;\nobj.Pressure_WorkingChamber = press_work;\nobj.Temp_Preheater = temp_pre;\nobj.Temp_WorkingChamber = temp_work;\n\nmsg.payload = obj;\nreturn msg;",
69+
"outputs": 1,
70+
"language": "javascript",
71+
"noerr": 0,
72+
"x": 440,
73+
"y": 180,
74+
"wires": [
75+
[
76+
"79dc13ad.bb2cac"
77+
]
78+
]
79+
},
80+
{
81+
"id": "6f440ba8.2034e4",
82+
"type": "function",
83+
"z": "42c6ce94.a9202",
84+
"name": "Basic Machine Status",
85+
"func": "function getRandomInt(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return (Math.floor(Math.random() * (max - min + 1)) + min).toString();\n}\n\nlet programList = [\"EDS TTU 553 V8\",\"PA12 - KKT Vorheizen\",\"TC 3D AKF PA11\",\"detax v30\",\"Tool changing position\",\"EDS PT 3404 Balanced\",\"Postprocessing\", \"PT Black TL l-R\", \"PT White FT\", \"Preprocessing\", \"Cleaning\", \"PT M FT L-R\"];\n\nlet progr = programList[Math.floor(Math.random() * programList.length)];\nvar stat = getRandomInt(1,5);\nvar id = getRandomInt(1000,9999999);\n\nvar obj = {};\nobj._time = new Date();\nobj.Machine_Status = stat;\nobj.Program_Id = id;\nobj.Program_Name = progr;\n\nmsg.payload = obj;\nreturn msg;",
86+
"outputs": 1,
87+
"language": "javascript",
88+
"noerr": 0,
89+
"x": 440,
90+
"y": 280,
91+
"wires": [
92+
[
93+
"27a7aa93.b2ae06"
94+
]
95+
]
96+
},
97+
{
98+
"id": "6eebeb9e.d6f334",
99+
"type": "function",
100+
"z": "42c6ce94.a9202",
101+
"name": "Basic Machine Sensors",
102+
"func": "function getRandomDouble(min, max) {\n return (Math.random() * (max - min) + min).toString();\n}\nfunction getRandomInt(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return (Math.floor(Math.random() * (max - min + 1)) + min).toString();\n}\nvar temp_pre = getRandomInt(80,100) + getRandomDouble(10,30);\nvar temp_work = getRandomInt(120,140) + getRandomDouble(10,60);\nvar press_pre = getRandomInt(10,20) + getRandomDouble(2,7);\nvar press_work = getRandomInt(2,5) + getRandomDouble(2,7);\n\nvar obj = {};\nobj._time = new Date();\nobj.Pressure_Preheater = press_pre;\nobj.Pressure_WorkingChamber = press_work;\nobj.Temp_Preheater = temp_pre;\nobj.Temp_WorkingChamber = temp_work;\n\nmsg.payload = obj;\nreturn msg;",
103+
"outputs": 1,
104+
"language": "javascript",
105+
"noerr": 0,
106+
"x": 440,
107+
"y": 340,
108+
"wires": [
109+
[
110+
"9499b1d7.0e5eb"
111+
]
112+
]
113+
},
114+
{
115+
"id": "846f330b.fd38c",
116+
"type": "function",
117+
"z": "42c6ce94.a9202",
118+
"name": "Basic Machine Status",
119+
"func": "function getRandomInt(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return (Math.floor(Math.random() * (max - min + 1)) + min).toString();\n}\n\nlet programList = [\"EDS TTU 553 V8\",\"PA12 - KKT Vorheizen\",\"TC 3D AKF PA11\",\"detax v30\",\"Tool changing position\",\"EDS PT 3404 Balanced\",\"Postprocessing\", \"PT Black TL l-R\", \"PT White FT\", \"Preprocessing\", \"Cleaning\", \"PT M FT L-R\"];\n\nlet progr = programList[Math.floor(Math.random() * programList.length)];\nvar stat = getRandomInt(1,5);\nvar id = getRandomInt(1000,9999999);\n\nvar obj = {};\nobj._time = new Date();\nobj.Machine_Status = stat;\nobj.Program_Id = id;\nobj.Program_Name = progr;\n\nmsg.payload = obj;\nreturn msg;",
120+
"outputs": 1,
121+
"language": "javascript",
122+
"noerr": 0,
123+
"x": 440,
124+
"y": 440,
125+
"wires": [
126+
[
127+
"e684622d.42458"
128+
]
129+
]
130+
},
131+
{
132+
"id": "c6db8a58.f773c8",
133+
"type": "function",
134+
"z": "42c6ce94.a9202",
135+
"name": "Basic Machine Sensors",
136+
"func": "function getRandomDouble(min, max) {\n return (Math.random() * (max - min) + min).toString();\n}\nfunction getRandomInt(min, max) {\n min = Math.ceil(min);\n max = Math.floor(max);\n return (Math.floor(Math.random() * (max - min + 1)) + min).toString();\n}\nvar temp_pre = getRandomInt(80,100) + getRandomDouble(10,30);\nvar temp_work = getRandomInt(120,140) + getRandomDouble(10,60);\nvar press_pre = getRandomInt(10,20) + getRandomDouble(2,7);\nvar press_work = getRandomInt(2,5) + getRandomDouble(2,7);\n\nvar obj = {};\nobj._time = new Date();\nobj.Pressure_Preheater = press_pre;\nobj.Pressure_WorkingChamber = press_work;\nobj.Temp_Preheater = temp_pre;\nobj.Temp_WorkingChamber = temp_work;\n\nmsg.payload = obj;\nreturn msg;",
137+
"outputs": 1,
138+
"language": "javascript",
139+
"noerr": 0,
140+
"x": 440,
141+
"y": 500,
142+
"wires": [
143+
[
144+
"25e44221.d6425e"
145+
]
146+
]
147+
},
148+
{
149+
"id": "31e8510f.54df0e",
150+
"type": "inject",
151+
"z": "42c6ce94.a9202",
152+
"name": "",
153+
"topic": "",
154+
"payload": "",
155+
"payloadType": "date",
156+
"repeat": "300",
157+
"repeatEnd": "0",
158+
"endTime": "0",
159+
"crontab": "",
160+
"offset": "",
161+
"once": false,
162+
"properties": "",
163+
"timezone": "utc",
164+
"betweentimesunit": "m",
165+
"enableRuleEngine": false,
166+
"showNextExecution": true,
167+
"powerMode": false,
168+
"x": 130,
169+
"y": 260,
170+
"wires": [
171+
[
172+
"cc846ce2.eef4a",
173+
"c5716581.b7e138",
174+
"6f440ba8.2034e4",
175+
"6eebeb9e.d6f334",
176+
"846f330b.fd38c",
177+
"c6db8a58.f773c8"
178+
]
179+
]
180+
},
181+
{
182+
"id": "7f529f86.7fc4e",
183+
"type": "write timeseries",
184+
"z": "42c6ce94.a9202",
185+
"name": "",
186+
"topic": "4c011fd02a2b4990a80d2c4c6d25ef23/Dashboard_Machine_Status",
187+
"topicData": "{\"asset\":\"4c011fd02a2b4990a80d2c4c6d25ef23\",\"assetName\":\"Basic Machine\",\"aspect\":\"7600f42a1d324f73b10d00ec963febfd\",\"aspectName\":\"Dashboard_Machine_Status\",\"variable\":null,\"variableName\":null}",
188+
"topicLabel": "Basic Machine/Dashboard_Machine_Status",
189+
"assetName": "",
190+
"aspectName": "",
191+
"useMerging": false,
192+
"x": 950,
193+
"y": 120,
194+
"wires": []
195+
},
196+
{
197+
"id": "79dc13ad.bb2cac",
198+
"type": "write timeseries",
199+
"z": "42c6ce94.a9202",
200+
"name": "",
201+
"topic": "4c011fd02a2b4990a80d2c4c6d25ef23/Dashboard_Machine_Sensor",
202+
"topicData": "{\"asset\":\"4c011fd02a2b4990a80d2c4c6d25ef23\",\"assetName\":\"Basic Machine\",\"aspect\":\"59e5446feebb454eaf3ef7ce24565dfb\",\"aspectName\":\"Dashboard_Machine_Sensor\",\"variable\":null,\"variableName\":null}",
203+
"topicLabel": "Basic Machine/Dashboard_Machine_Sensor",
204+
"assetName": "",
205+
"aspectName": "",
206+
"useMerging": false,
207+
"x": 950,
208+
"y": 180,
209+
"wires": []
210+
},
211+
{
212+
"id": "27a7aa93.b2ae06",
213+
"type": "write timeseries",
214+
"z": "42c6ce94.a9202",
215+
"name": "",
216+
"topic": "a12faec62d33439ea297adcde30ef5d2/Dashboard_Machine_Status",
217+
"topicData": "{\"asset\":\"a12faec62d33439ea297adcde30ef5d2\",\"assetName\":\"Performance Machine\",\"aspect\":\"7600f42a1d324f73b10d00ec963febfd\",\"aspectName\":\"Dashboard_Machine_Status\",\"variable\":null,\"variableName\":null}",
218+
"topicLabel": "Performance Machine/Dashboard_Machine_Status",
219+
"assetName": "",
220+
"aspectName": "",
221+
"useMerging": false,
222+
"x": 970,
223+
"y": 280,
224+
"wires": []
225+
},
226+
{
227+
"id": "9499b1d7.0e5eb",
228+
"type": "write timeseries",
229+
"z": "42c6ce94.a9202",
230+
"name": "",
231+
"topic": "a12faec62d33439ea297adcde30ef5d2/Dashboard_Machine_Sensor",
232+
"topicData": "{\"asset\":\"a12faec62d33439ea297adcde30ef5d2\",\"assetName\":\"Performance Machine\",\"aspect\":\"59e5446feebb454eaf3ef7ce24565dfb\",\"aspectName\":\"Dashboard_Machine_Sensor\",\"variable\":null,\"variableName\":null}",
233+
"topicLabel": "Performance Machine/Dashboard_Machine_Sensor",
234+
"assetName": "",
235+
"aspectName": "",
236+
"useMerging": false,
237+
"x": 980,
238+
"y": 340,
239+
"wires": []
240+
},
241+
{
242+
"id": "e684622d.42458",
243+
"type": "write timeseries",
244+
"z": "42c6ce94.a9202",
245+
"name": "",
246+
"topic": "1ccfd846e53447de88fdaaeeeddd6d78/Dashboard_Machine_Status",
247+
"topicData": "{\"asset\":\"1ccfd846e53447de88fdaaeeeddd6d78\",\"assetName\":\"Eco Machine\",\"aspect\":\"7600f42a1d324f73b10d00ec963febfd\",\"aspectName\":\"Dashboard_Machine_Status\",\"variable\":null,\"variableName\":null}",
248+
"topicLabel": "Eco Machine/Dashboard_Machine_Status",
249+
"assetName": "",
250+
"aspectName": "",
251+
"useMerging": false,
252+
"x": 950,
253+
"y": 440,
254+
"wires": []
255+
},
256+
{
257+
"id": "25e44221.d6425e",
258+
"type": "write timeseries",
259+
"z": "42c6ce94.a9202",
260+
"name": "",
261+
"topic": "1ccfd846e53447de88fdaaeeeddd6d78/Dashboard_Machine_Sensor",
262+
"topicData": "{\"asset\":\"1ccfd846e53447de88fdaaeeeddd6d78\",\"assetName\":\"Eco Machine\",\"aspect\":\"59e5446feebb454eaf3ef7ce24565dfb\",\"aspectName\":\"Dashboard_Machine_Sensor\",\"variable\":null,\"variableName\":null}",
263+
"topicLabel": "Eco Machine/Dashboard_Machine_Sensor",
264+
"assetName": "",
265+
"aspectName": "",
266+
"useMerging": false,
267+
"x": 950,
268+
"y": 500,
269+
"wires": []
270+
}
271+
]

0 commit comments

Comments
 (0)