Wiki source code of 06 Data Tool

Version 41.1 by Mora Zhou on 2023/09/08 14:07

Show last authors
1 (% class="wikigeneratedid" %)
2 This chapter provides information about basic functions and configuration in PIStudio.
3
4 = **Alarm** =
5
6 == Bit alarm ==
7
8 Click "Project"→"Bit Alarm", it is displayed as the following figure.
9
10 (% style="text-align:center" %)
11 [[image:位报警 1.png||data-xwiki-image-style-alignment="center" class="img-thumbnail"]]
12
13 **Group No.: **Group number of Bit alarm. The name is unique and cannot be duplicated.
14
15 **Bit Address: **Bit address of alarm monitoring
16
17 * **Record bit alarm by default:**  Whether to record the alarm history data of bit alarm, if checked, it will be saved in the designated storage location.
18 * **Not save alarm OFF:** If checked, after the alarm is dismissed, the corresponding alarm records will be deleted from the log file.
19
20 **Upload to Cloud: **The data upload by "bit alarm" is stored in the Cloud and it is alarm data. (Only ig series and 8000/9000 series with -R after system upgrade are supported)
21
22 (% class="box infomessage" %)
23 (((
24 **✎Note:**
25
26 * After enable the Cloud and check the box of Upload to Cloud, the communication port settings of the address in the imported Bit Alarm record configuration must be the same as the communication port settings of the current project, otherwise it cannot be used normally.
27 * The number of Alarm records upload to Cloud shall not exceed the limit value, or the sum of the imported alarm records and the number of existing alarm records shall not exceed the limit value. the specific limitation as following table:
28
29 (% class="table-bordered" style="margin-left:auto; margin-right:auto; width:358px" %)
30 |=(% style="width: 79px;" %)Series|=(% style="width: 276px;" %)Number of Alarm upload to Cloud
31 |(% style="width:79px" %)8000-R|(% style="text-align:center; width:276px" %)200
32 |(% style="width:79px" %)9000-R|(% style="text-align:center; width:276px" %)200
33 |(% style="width:79px" %)3000ig|(% style="text-align:center; width:276px" %)20
34 |(% style="width:79px" %)8000ig|(% style="text-align:center; width:276px" %)200
35 )))
36
37 **Alarm Condition:** It sets alarm trigger condition, there are two types: alarm when ON and alarm when OFF.
38
39 **Alert: **It is used to mark whether the alarm has occurred. if an alarm occurs, the address of "control bit" will be written to 1. If "clear alert when alarm OFF" is checked, the address of "control bit" will be written to 0.
40
41 **Beep when alarm ON: **The beep works when the alarm is triggered. If "beep once" is checked, bit address alarm only beep once and stop.
42
43 **Content: **It is used for setting alarm content (command).
44
45 **Alarm Screen: **Pop-up alarm screen (it need to be sub-screen);
46
47 * **Position: **The location of the screen alarm display.
48 * **Pop-up Interval: **The time of reopen the alarm screen when alarm screen closed.
49 * **Pop-up once: **Pop up alarm screen once, and the screen would not pop up again
50 * **Close window when alarm off: **Automatically close the alarm screen when alarm off.
51
52 **✎Note:**
53
54 * If the "cloud" function is enabled and "upload to cloud" is checked, the communication port of the address in the configuration of the imported bit alarm record must be the same as that of the current project; otherwise, it cannot be used normally.
55 * The number of alarm configuration points reported to the cloud cannot exceed 20, or the sum of imported alarm records and the current alarm records cannot exceed 20. If it exceeds, please reconfigure.
56
57 **Operating Procedures of Adding One Alarm**
58
59 * Click "Project"→"Bit Alarm" as below shows.
60
61 (% style="text-align:center" %)
62 [[image:8.Basic Function_html_5f8da20315334bac.png||data-xwiki-image-style-alignment="center" height="144" width="539" class="img-thumbnail"]]
63
64 * Click "Add" button to open "Bit Alarm" setting window.
65
66 (% style="text-align:center" %)
67 [[image:8.Basic Function_html_94a019683b506e15.png||data-xwiki-image-style-alignment="center" height="307" width="554" class="img-thumbnail"]]
68
69 * Set "Bit Address".
70 * Set "Alarm Condition".
71 * Set "Content".
72 * Other settings can be set according to the actual situation".
73 * Click "OK" button to complete settings.
74
75 == Word alarm ==
76
77 Word alarm is to monitor the word address of a device. If the data meets the set conditions, an alarm will be generated.
78
79 Click "Project"→"Word alarm", it is displayed as the following figure.
80
81 (% style="text-align:center" %)
82 [[image:字报警 1.png||class="img-thumbnail"]]
83
84 **Alarm Name:** You can set alarm name for it. Alarm Name can only consist of (0~~9), (a~~z), (A~~Z), ('_'), (' ') and other non-English characters.
85
86 **Alarm Address: **It is used for setting word address for word alarm, such as HDW0.
87
88 **Data Format: **16-bit unsigned decimal, 16-bit signed decimal, 16-bit BCD, 32-bit unsigned decimal, 32-bit signed decimal, 32-bit BCD, 32-bit float.
89
90 **Group No.: **Group number of word alarm. The name is unique and cannot be duplicated.
91
92 **Upload to Cloud: **The data upload by "word alarm" is stored in the Cloud and it is alarm data. (Only ig series and 8000/9000 series with -R after system upgrade are supported)
93
94 (% class="box infomessage" %)
95 (((
96 **✎Note:**
97
98 * If the "cloud" function is enabled and "upload to cloud" is checked, the communication port of the address in the configuration of the imported word alarm record must be the same as that of the current project; otherwise, it cannot be used normally.
99 * The number of alarm configuration points reported to the cloud cannot exceed 20, or the sum of imported alarm records and the current alarm records cannot exceed 20. If it exceeds, please reconfigure.
100
101 (% style="margin-left:auto; margin-right:auto; width:358px" %)
102 |=(% style="width: 79px;" %)Series|=(% style="width: 276px;" %)Number of Alarm upload to Cloud
103 |(% style="width:79px" %)8000-R|(% style="text-align:center; width:276px" %)200
104 |(% style="width:79px" %)9000-R|(% style="text-align:center; width:276px" %)200
105 |(% style="width:79px" %)3000ig|(% style="text-align:center; width:276px" %)20
106 |(% style="width:79px" %)8000ig|(% style="text-align:center; width:276px" %)200
107 )))
108
109 **Record alarm:**  Whether to record the alarm history data of word alarm, if checked, it will be saved in the designated storage location.
110
111 **Not save alarm OFF:** If checked, after the alarm is dismissed, the corresponding alarm records will be deleted from the log file.
112
113 **Alarm Condition**: Alarm is triggered when designated address meets the alarm condition, it provides four conditions;
114
115 1. **High alarm:** Alarm is triggered when it reaches high limit. It can be a constant or a variable
116 1. **Low alarm:** Alarm is triggered when it reaches low limit. It can be a constant or a variable
117 1. **Range alarm:** Alarm is triggered when it exceeds the range. It can be a constant or a variable
118 1. **Equivalent alarm: **Alarm is triggered when the value equals to the given data. It can be a constant or a variable
119
120 **Alarm Info: **It is used for setting alarm content (command);
121
122 **Alert: **It is used to mark whether the alarm has occurred. if an alarm occurs, the address of "control bit" will be written to 1. If "clear alert when alarm OFF" is checked, the address of "control bit" will be written to 0.
123
124 **Alarm Screen: **Pop-up alarm screen (it need to be sub-screen);
125
126 1. **Position: **The location of the screen alarm display.
127 1. **Pop-up Interval: **The time of reopen the alarm screen when alarm screen closed.
128 1. **Pop-up once: **Pop up alarm screen once.
129 1. **Close window when alarm off: **Automatically close the alarm screen when alarm off.
130
131 **Beep when alarm ON: **beep works when the alarm is triggered, in the default mode, the beep works until the alarm is released.
132
133 **Beep once:** Beep works once, when alarm is triggered.
134
135 **Alarm List**
136
137 It displays all the word alarm lists; it will show the alarm information;
138
139 **Operating Procedures of Adding One Alarm**
140
141 * Click "Project"→ "Word Alarm" as below shows.
142
143 (% style="text-align:center" %)
144 [[image:8.Basic Function_html_1b59522c984cd7c2.png||height="144" width="492" class="img-thumbnail"]]
145
146 * Click "AddClick" button to open "Word Alarm" setting window.
147
148 (% style="text-align:center" %)
149 [[image:8.Basic Function_html_942107c81fc6901c.png||height="307" width="554" class="img-thumbnail"]]
150
151 * Set Basic information of word alarm.
152 * Set "Content".
153 * Other settings can be set according to the actual situation.
154 * Click "OK" button to complete settings.
155
156 **HMI Alarm Demo Download Link**
157
158 [[https:~~/~~/drive.google.com/open?id=1Llq03CMISM_1mMIfU308hxFbs4rGdQGP>>url:https://drive.google.com/open?id=1Llq03CMISM_1mMIfU308hxFbs4rGdQGP]]
159
160 = **Recipe** =
161
162 Traditional recipe is composed of multiple groups of information with the same structure and different data. Due to the similarity of these information, you could edit them into a set of recipes to facilitate the transfer of data between HMI and PLC.
163
164 Data operation
165
166 1. **Read:** Read a group of data from the recipe file and assign the group of data to the set address.
167 1. **Write: **Read a group of data from the set address and assign the group of data to the corresponding recipe file.
168
169 PI Series HMI has Recipe function, Recipe function keeps data in the HMI, used to download the data from HMI to designated device addresses, or upload the data from device addresses to HMI.
170
171 The maximum number of group in recipe is 1000, and the maximum number of member in each group is 1500.
172
173 Recipe could store the data in USB flash disk and SD card and view the recipe data by object "Recipe display". It has two mode: simple mode and advanced mode.
174
175 1. **Simple: **Only support the data operation of one recipe file, including read and write.
176 1. **Advanced:** Support the data operation of multiple recipe files, including read, write, insert and index. View and select recipe file by object "File list".
177
178 Recipe function settings will be display in "[[Recipe display>>http://docs.we-con.com.cn/wiki/pistudio/view/Helps/06.Objects/#HRecipedisplay]]" object.
179
180 **Description**
181
182 (% style="text-align:center" %)
183 [[image:8-1Recipe.png]]
184
185 **Basic**
186
187 * **Recipe Folder:** Give Recipe folder name (It can be used, when setting Recipe display object);
188 ** (% class="box infomessage" %)
189 (((
190 **✎Note: **Recipe Folder name can only consist of (0~~9), (a~~z), (A~~Z), ('_'), (' ') and other non-English characters;
191 )))
192 * **Group: **Set the recipe group number, the number of elements, the data format. The data format has 8 modes: 16-bit signed decimal, 16-bit unsigned decimal, 16-bit BCD, 32-bit signed decimal, 32-bit unsigned decimal, 16-bit BCD, 32-bit floating point number, 64-bit (double-precision) floating-point number, string, and the choice of data integer and decimal places.
193 * **Elements:** It sets members' initial number of each group;
194 * **Data Format:** There are some formats can be supported in Recipe, like 16-bit BCD, 16-bit signed, 16-bit unsigned, 32-bit BCD, 32-bit signed, 32-bit unsigned, 32-bit floating and string. If each member requires different formats, please set it one by one in form;
195 * **Decimal: **It sets integer and scale digits;
196
197 **Mode Selection: **Select Simple or Advanced mode. Recipe file is divided into simple mode and advanced mode. Only in advanced mode can exist multiple recipe files used at the same time. (used wiht file list onject), Simple mode can only support a recipe file; Aadvanced mode can insert group information and reordered.
198
199 Function address: all operations are done through function addresses, different operating value is as follows:
200
201 * = 0: no operation;
202 * = 1: trigger read data;
203 * = 2: new trigger or update (If there is group number, it updates.)
204 * = 4: insert (only valid in advanced mode)
205 * = 8: delete (Delete according to the writing group number. If write and read address are consistent, refer to the reading group number);
206 * = 16: delete and sorted ((Delete according to the writing group number. If write and read address are consistent, refer to the reading group number)
207 * = 64: import CSV recipe file.
208
209 **Use Multiple File**
210
211 Check it to use more than one recipe file in HMI, but this option only valid in [Advanced mode];
212
213 **Select language**
214
215 The text in HMI can be in 8 languages, user can set language in here;
216
217 **Address**
218
219 1. **Group:** This address is for selecting group number;
220 1. **Start: **This is starting address is for reading and writing in recipe, PIStudio will automatically assigns addresses for each members;
221 1. **File(16 words): **This address only available when enable the Use Multiple File. This setting address is for input the recipe file's filename.
222
223 **Use Index**
224
225 If the value from Group address is changed, Read address will display the new data according to new group number immediately. Relatively, if the data of write address is changed, the corresponding group from table is also changed.
226
227 **Query by Element**
228
229 Enable it for querying group by specify element, select a primary key from all the elements, except the group number. This element value from all groups must be unique if want to set as primary key;
230
231 (% class="box infomessage" %)
232 (((
233 **✎Note: **When this option is enabled, Group address will be invalid.
234 )))
235
236 **Use Independent Write Address**
237
238 To separate Recipe read address and write address.
239
240 **Use Insert**
241
242 It inserts data into the specified group, if the specified group already exists, it would not cover the original data, while it will move the original group next one after it.
243
244 **Discontinuous Address**
245
246 Whether enable the non-consecutive recipe operation addresses or not. If disabled, the recipe address will recover as the continuous addresses.
247
248 (% class="box infomessage" %)
249 (((
250 **✎Note: **This function only supported in HMI+, i series, ie series, ig series.
251 )))
252
253
254 **Description of adcanced mode**
255
256 According to the recipe configuration information in Figure 2 above. The function address is HDW70, and each function configuration corresponds to the group number address, recipe element address and recipe file name address. The recipe information configured in figure 2 can be displayed in the table in figure 3 with the "Record Display" object.
257
258 [[image:image-20220806111333-1.jpeg]]
259
260 **Read recipe**: Input 1 to the file name, when the group number addresses HDW100=1 and HDW70=1 (read), the element data of the first group (ID=1) is written to the recipe address from the recipe file. As shown in Figure 3 above: HDW105=1, HHDW106=2, HDW107=3, HDW108=4, HDW109=5.
261
262 **Write recipe**: Input 1 to the file name, when the group number addresses HDW101=4 and HDW70=2 (write), the data will be read from the recipe address and written to the corresponding group of the recipe file. As shown in figure 3 above: HDW110=20, HHDW111=21, HDW112=22, HDW113=23, HDW114=24. Write the data of this set to the elements of ID=4 in the recipe table (if there is no data of Group 4 in the recipe file, a new set of data will be added; If there is data of Group 4 in the original recipe, the original data will be overwritten and the latest data will be displayed in the recipe file).
263
264 **Index recipe**: When the file name is input 1, when the group number address HDW102=3, the data of ID=3 (Group 3) in the recipe file will be directly displayed in the component address of the index, that is, HDW115=11, HHDW116=12, HDW117=13, HDW118=14 and HDW119=15. If the data of the index component address is modified, the modified data will be automatically filled into the table of the recipe file, that is, the data of the recipe file will be automatically updated after the data is modified.
265
266 [[image:image-20220806111355-2.jpeg]]
267
268 **Insert recipe**: Input 1 to the file name, when the group number addresses HDW103=3 and HDW70=4 (insert), the data of the 3rd group will be inserted, but the data of the third group already exists in the original recipe file (see Figure 3 above), then the original data will be moved down by one group, that is, the original 3rd group will become the 4th group, and so on, and HDW120=16, HHDW121=17, HDW122=18, HDW123=19 and HDW124=20 will be written into the new 3rd group of the recipe file at the same time. The results are shown in Figure 4 above.
269
270 When the group number address HDW101=2 (**The delete function only works on the group number of the write function**), HDW70=8 (delete), the data in the recipe file with ID=2 (Group 2) will be deleted.
271
272 When the group number address HDW101=5 (**The delete function only works on the group number of the write function**), HDW70=16 (delete and sort), the data of ID=5 (Group 5) in the recipe file will be deleted, and the original ID=6 (Group 6) data will be reordered to become the new Group 5 data, the original ID=7 (Group 7) data will be reordered to become the new Group 6 data, and so on.
273
274 **Recipe Demo Download Link: **[[Download>>url:https://drive.google.com/open?id=1Cjbq_tW-NIirHFBpxt47g7IKvoYaWqUR]]
275
276 == Calling CSV recipe file ==
277
278 **Overview**
279
280 The recipe files used by the regular series HMI are in CSV format, and the recipe files used by the current series HMI are in database format. In order to be compatible with CSV format recipe files on the current series of HMI, please follow the instruction when using it.
281
282 **Operations**
283
284 Create the recipe as it is configured. The default recipe file name is “1. rcp2”, which is placed in folder 123, as shown in the following figure.
285
286 (% style="text-align:center" %)
287 (((
288 (% style="display:inline-block" %)
289 [[Figure 1>>image:image-20220806100702-2.jpeg]]
290 )))
291
292 2. Place a "Recipe Record Display" object and a "File List" object on the project screen for viewing the recipe files in the folder 123, and the address configuration in the object should be consistent with the above configuration.
293
294 (% style="text-align:center" %)
295 [[image:image-20220806100753-3.jpeg]]
296
297 By configuring the address in the table and combining the recipe function, the CSV recipe files of regular series are imported.
298
299 |=Address range|=Object type|=Address function
300 |HSW1050 to 1065|Text input object|Enter the CSV recipe file name to import
301 |HSW1066|Numerical input object|Import CSV file type:(((
302 * = 0: Custom CSV file (all data in the file is valid)
303 * = 1: Normal recipe file for regular series HMI (the data in line 1 of the file is invalid)
304 * = 2: Special recipe file for regular series HMI (the data in line 1 and 2 and column 1 of the file are invalid)
305 )))
306 |HSW1067|Numerical input object|(((
307 Where the CSV file is saved:
308
309 * = 0: In the CsvFile directory of U disk
310 * = 1: In the CsvFile directory of the SD card
311
312 **The path for offline simulation is: C:\ HMIEmulation\ CustomFileDir\ CsvFile**
313 )))
314 |HSW242|Numerical input object|Returns the results of the csv import:(((
315 * = 37: CSV file imported successfully
316 * = 38: CSV file import failed
317 )))
318
319 **Select CSV recipe file (take U disk as an example):**
320
321 Using the file list object, select the recipe file in the U disk by path, and configure the recipe file name address directly to the special address HSW1050 in the above table, which can directly detect the CSV file in the U disk; Select the recipe file in the file list, and write the selected recipe file name into the recipe file name: In HSW1050 to 1065.
322
323 Use the special address of the above table to configure the path of the CSV file: HSW106, configure recipe file name: HSW1050 to1065
324
325 Use HSW1066 address to select the corresponding CSV recipe file type.
326
327 * HSW1066 = 0: Import a user-defined CSV recipe file (all data in the custom CSV file must be valid);
328
329 (% style="text-align:center" %)
330 [[image:image-20220806101129-5.jpeg]]
331
332 * HSW1066=1: Import the normal recipe file of regular series HMI (the data in line 1 of the file is invalid);
333
334 The data in line 1 of the normal recipe file is used to define the format of the recipe and will not be imported into the recipe table as recipe information, **but you must ensure that the data in line 1 representing the elements and number of groups is correct, otherwise the CSV recipe file will fail to be imported.**
335
336 (% style="text-align:center" %)
337 [[image:image-20220806101520-6.jpeg]]
338
339 * HSW1066=2: Import the special recipe file of regular series HMI (the data in line 1, 2 and column 1 of the file are invalid);
340
341 In the special recipe file, line 1 is used to define the format of the recipe, line 2 is used to define the element name of the recipe, and column 1 is used to define the group name of the recipe, so lines 1, 2 and column 1 of the special recipe will not be imported into the recipe table as recipe information. **During use, ensure that the data such as the number of groups and elements representing the recipe format in the first line are correct, otherwise the import of the CSV recipe file will fail.**
342
343 (% style="text-align:center" %)
344 [[image:image-20220806102610-7.jpeg]]
345
346 **Perform import**
347
348 After configuring the saving path of CSV recipe file, the name of recipe file and the type of recipe according to the above steps, the method of transferring CSV file to DB file is as follows:
349
350 * Configure the DB recipe file name by text input object: HDW500 = 3 (recipe file configured in Figure 1),
351 * Set the recipe function address to: HDW1000 = 64 (the function address configured in Figure 1),
352 * Transform the CSV recipe file in U disk into DB recipe file with file name “3.rcp2”.
353
354 **DB recipe file for storing CSV data:**
355
356 Simple mode: When the recipe file is set to simple mode, the file of CSV data is saved as the DB recipe file of 1. rcp2 by default.
357
358 Advanced mode: When the recipe is enabled in advanced mode (multi-file recipe), the imported CSV file data is saved to the file recorded at the recipe file address HDW500 (the address configured in Figure 1).
359
360 **Import results:**
361
362 * HSW242 = 37: Import succeeded;
363 * HSW242 = 38: Import failed.
364
365 **Precautions:**
366
367 * Ensure that the data format of each element in the CSV file is the same as the recipe data format set in the software (DB), and ensure that the elements of each row in the valid data area is the same as the elements set in the software (DB);
368 * When the elements of a line in CSV file is more than the elements set in the software (DB), it will prompt the import failure;
369 * When the CSV file imported into the regular series HMI is a recipe file, the data representing the recipe format (elements, number of groups, whether it is a special recipe) in line 1 must be correct, otherwise the import of CSV file will fail.
370
371 = (% style="color:inherit; font-family:inherit; font-size:29px" %)**Traditional recipe**(%%) =
372
373 Traditional recipe is composed of multiple groups of information with the same structure and different data. Due to the similarity of these information, you could edit them into a set of recipes to facilitate the transfer of data between HMI and PLC.
374
375 Traditional recipe function is valid only when the LEVI project is converted to the PI project, and the original project uses the traditional recipe.
376
377 (% class="box infomessage" %)
378 (((
379 **✎Note**: Currently, only HMI+, i series, ie series, and ig series support the traditional recipe.
380 )))
381
382 == Simple recipe mode ==
383
384 Click the "Traditional Recipe" [[image:8-2TraditionalRecipe.png]] in the "Data tool" bar in the upper side of the software, and the following interface will pop up:
385
386 (% style="text-align:center" %)
387 [[image:8-3TraditionalRecipeConfigScreen.png||class="img-thumbnail"]]
388
389 **✎Note**:
390
391 * The recipe folder name can only consist of (0~~9), (a~~z), (A~~Z), ('_'), ('').
392 * The element name of the recipe cannot include following 5 special characters: " **,** " , " **|** " , " **<** " , " **>** " , " **&** " .
393
394 == Recipe display ==
395
396 Select the file type "Traditional recipe file" in object "Recipe Display", and it is recommended to fill in the traditional recipe group number HSW1612 to the address of select line.
397
398 (% class="box infomessage" %)
399 (((
400 **✎Note**: The Recipe Display can display up to 50 groups of 100 elements by default, which can be to display out of range by enabled "Address Control". After the "Address Control" is enabled, the display group number can be reached to 100. If want to display more than 100, please adjust the "Start Group" from "Address Control" to index the display group, as following shown:
401 )))
402
403 (% style="text-align:center" %)
404 [[image:8-4TraditionalRecipeDisplayConfigScreen.png||class="img-thumbnail"]]
405
406 == Recipe transmission address ==
407
408 The special addresses used in the Recipe are shown in the following table:
409
410 (% class="table-bordered" %)
411 |=Address|=Description|=Function
412 |HSW1611|Traditional Recipe transfer operation.|(((
413 ~=1: Recipe download.
414
415 ~=2: Recipe upload.
416 )))
417 |HSW1612|Traditional Recipe group number.|Traditional Recipe group number.
418 |(((
419 HSW242
420 )))|(((
421 Recipe operation result prompt:
422
423 Upload: Data is written to recipe file from address.
424
425 Download: Data is written to the address from recipe file.
426 )))|(((
427 ~=1: Recipe download, start.
428
429 ~=2: Recipe download, execution error.
430
431 ~=6: Recipe download, successful.
432
433 ~=7: Recipe upload, start.
434
435 ~=8: Recipe upload, execution error.
436
437 ~=11: Recipe group name does not exist.
438
439 ~=12: Recipe upload, successful.
440 )))
441
442 == **Recipe index** ==
443
444 The recipe index address RPW is mainly used for editing traditional recipes, and it is more convenient to modify the data and display of recipes. Only need to modify and display the data of the recipe file through "Numeric Input/Display" Object and "Word Switch".
445
446 The recipe index area (RPW)'s instruction as follows:
447
448 1. RPW~*~*~#~#~#~#, a total of six digits, the first two ~*~* represent the Recipe group number, ~#~#~#~# represents the element order number. For example, RPW010000 indicates the 1st element of the Recipe group No.1, and RPW110002 indicates the 3rd element of the Recipe group No.11.
449 1. If the indexed group number or element number does not exist, the value of RPW defaults to zero. For example, RPW110011 represents the 12th element of the Recipe group No.11. If it does not exist, the value returned by accessing RPW110011 is zero. The value written in RPW110011 will not be saved to the recipe file.
450
451 * **✎Note**: As long as RPW~*~*~#~#~#~# exists, any object "writes" to HPW~*~*~#~#~#~# will be saved to the recipe file. 
452
453 (% start="3" %)
454 1. The RPW register only supports word address access.
455 1. It can be known from the coding method of RPW~*~*~#~#~#~# that the range of RPW is from RPW000000-RPW990450, wherein the range of group number is 0-100, and the range of element is 0-450.
456
457 == Recipe example ==
458
459 The recipe index makes the modification and display of recipe data more convenient. Only need to modify and display the data of the recipe file through "Numeric Input/Display" Object and "Word Switch".
460
461 Edit the recipe configuration, create three groups of recipes, 4 elements for per group: Red, green, blue, spraying time, as following shown:
462
463 (% style="text-align:center" %)
464 [[image:8-5TraditionalRecipeCaseConfig.png]]
465
466 RPW 0~~3 can display the data of group for the selected line. RPW10000~~10003, RPW20000~~20003, RPW30000~~30003 each address can display the single element. Directly modify the content of the RPW address and then modify the recipe data, as following shown:
467
468 (% style="text-align:center" %)
469 [[image:8-7TraditionalRecipeCaseShowNoOpera.png]]
470
471 After selecting the 2nd group, trigger the download button to download the whole group data to the corresponding element address (For this case, the data will write into HDW0~~3), or trigger the upload button to upload the content of the element address to the specified recipe group.
472
473 (% style="text-align:center" %)
474 [[image:8-6TraditionalRecipeCaseShow.png]]
475
476 = **Trend chart** =
477
478 Trend chart function is used for displaying the real-time data in HMI as curve graph, which X axis represent as time, Y axis represent as data.
479
480 Click "Project" → "Trend chart", it will pop up the following screen. Click "Add" to creat new curve record.
481
482 (% style="text-align:center" %)
483 [[image:趋势图配置 001.png||class="img-thumbnail"]]
484
485 **Settings**
486
487 (% style="text-align:center" %)
488 [[image:趋势图设置 2.png||height="507" width="866"]]
489
490 **(1) Basic settings**
491
492 1. **Curve NO.: **It is for setting curve number,
493 1. **Curve Name:** It is for setting curve name. The length limitation is 31 bytes.
494 1. **Curve (1~~8):** It is for setting the number of curves. The default is 3.
495 1. **Dots of one curve: **It is for setting dots number of each curve. The default is 1000, but the maximum dots are 10,000 for all the curves.
496
497 **(2) Sample Type**
498
499 1. **Sample method:** There are two types, one is Cycle sample, the other is Trigger cycle sample. If you select Trigger cycle same mode, the trigger sample address is required to edit.
500 1. **Sample unit:** 100ms.
501
502 **(3) Quick Setting**
503
504 1. **Data format: **It is for setting all the curves, select the data format for all curves, and setting the reading addresses for curves. There are as follows.
505
506 (% style="text-align:center" %)
507 [[image:趋势图设置 3.png||class="img-thumbnail"]]
508
509 (% start="2" %)
510 1. **Sample address: **Fill in the start address that read the device data. If the sampl address is consecutive, check "use continuous address". For example, set HDW0 as start address, curve number is 3, then the HDW0 is for Curve 1, HDW1 is for Curve2, HDW2 is for Curve 3.
511
512 **(4) Curve Table:** The sample address you have set would display on it. Click the corresponding box to modify the content.
513
514 (% class="box infomessage" %)
515 (((
516 **✎Note: **Curve names can only consist of Chinese characters, (0~~9), (a~~z), (A~~Z), ('_') (' '), and other non-English characters.
517 )))
518
519 **Trend Chart Demo Download Link**
520
521 [[https:~~/~~/drive.google.com/open?id=1smnaAvSxOWC0WQK4_uvqHXWn4vUZxGJC>>url:https://drive.google.com/open?id=1smnaAvSxOWC0WQK4_uvqHXWn4vUZxGJC]]
522
523 = **History XY plot** =
524
525 Different from TrendChart, uses need to set history XY curve items in project. Please click "Project"-> "History XY Plot" to open the setting screen.
526
527 Recipe function settings will be display in "[[History XY Plot>>path:https://docs.we-con.com.cn/bin/view/PIStudio/08.Basic%20Function/#HHistoryXYplot]]" object.
528
529 (% style="text-align:center" %)
530 [[image:历史XY 2.png||class="img-thumbnail"]]
531
532 (% style="text-align:center" %)
533 [[image:历史XY 3.png||class="img-thumbnail"]]
534
535 **(1) Basic settings**
536
537 1. **Curve NO.: **It is for setting curve number,
538 1. **Curve Name:** It is for setting curve name. The length limitation is 31 bytes.
539 1. **Curve (1~~8):** It is for setting the number of curves. The default is 3.
540 1. **Dots of one curve: **It is for setting dots number of each curve. The default is 1000, but the maximum dots are 10,000 for all the curves.
541
542 **(2) Sample Type**
543
544 1. **Sample method:** There are two types, one is Cycle sample, the other is Trigger cycle sample. If you select Trigger cycle same mode, the trigger sample address is required to edit.
545 1. **Sample unit:** 100ms.
546
547 **(3) Quick Setting**
548
549 1. **Data format: **It is for setting all the curves, select the data format for all curves, and setting the reading addresses for curves. There are as follows.
550
551 (% style="text-align:center" %)
552 [[image:image-20220616145435-1.png]]
553
554 (% start="2" %)
555 1. **Sample address: **Fill in the start address that read the device data. If the sample address is consecutive, check "use continuous address". For example, set HDW0 as start address, curve number is 3, then the HDW0 is for Curve 1, HDW1 is for Curve2, HDW2 is for Curve 3.
556
557 **(4) Curve Table:** The sample address you have set would display on it. Click the corresponding box to modify the content.
558
559 (% class="box infomessage" %)
560 (((
561 **✎Note: **Curve names can only consist of Chinese characters, (0~~9), (a~~z), (A~~Z), ('_') (' '), and other non-English characters.
562 )))
563
564 **Operating Procedure**
565
566 * Click "Project" → "History XY Plot" to open the function selecting windows.
567
568 (% style="text-align:center" %)
569 [[image:8.Basic Function_html_5da6ca44bd28acbe.png||height="144" width="533" class="img-thumbnail"]]
570
571 * Click "Add" button to open "History XY Plot” setting windows.
572
573 (% style="text-align:center" %)
574 [[image:8.Basic Function_html_6345b50ea55168fa.png||height="307" width="554" class="img-thumbnail"]]
575
576 * Setting the function of History XY Plot.
577 * Click "OK" to save the setting.
578
579 **Download Link**
580
581 [[https:~~/~~/drive.google.com/open?id=1t4_HuRmIJJ-B5ryA2kVMadD9FywKhZ4r>>url:https://drive.google.com/open?id=1t4_HuRmIJJ-B5ryA2kVMadD9FywKhZ4r]]
582
583 = (% style="color:inherit; font-family:inherit; font-size:29px" %)**Data record**(%%) =
584
585 The data record function is organized according to the structure below. In a project, there can be multiple record groups, each record group containing multiple channels. Different groups have different sampling times.
586
587 The topology is shown in the following figure.
588
589 (% style="text-align:center" %)
590 [[image:8.Basic Function_html_1b4bd09dafa7e049.png||height="332" width="554" class="img-thumbnail"]]
591
592 The data record stored in SD card is also organized according to the above figure.
593
594 The sample time and save time is consistent in the same record group. There are multiple channels in the group, When the sampling time is up, every channel would collect data to PLC register according to its own address.
595
596 **Sampling interval: **The interval between two consecutive samples was recorded.
597
598 As long as the project uses the data record function and supports the large-capacity storage module, the system will sample data according to the set sampling interval and save data according to the set saving interval.
599
600 For the file storage of data, see the file size configuration during data record configuration.
601
602 ✎**Note: **
603
604 After enable the Cloud and check the box of Upload to Cloud, the communication port settings of the address in the imported Data record configuration must be the same as the communication port settings of the current project, otherwise it cannot be used normally.
605
606 The number of Data records upload to Cloud shall not exceed the limit value, or the sum of the imported Data records and the number of existing alarm records shall not exceed the limit value. the specific limitation as following table:
607
608 (% style="margin-left:auto; margin-right:auto; width:513px" %)
609 |=(% style="width: 70px;" %)Series|=(% style="width: 442px;" %)Number of Data Record upload to Cloud
610 |(% style="width:70px" %)8000-R|(% style="text-align:center; width:442px" %)100
611 |(% style="width:70px" %)9000-R|(% style="text-align:center; width:442px" %)100
612 |(% style="width:70px" %)3000ig|(% style="text-align:center; width:442px" %)50
613 |(% style="width:70px" %)8000ig|(% style="text-align:center; width:442px" %)100
614
615 The record group name can only be composed of Chinese characters, (0~~9), (a~~z), (A~~Z), ('_'), ('') and other non-English characters.
616
617 Channel name cannot incloud following symbols: :" , ", " | ", " < ", " > ", " & ".
618
619 (% class="wikigeneratedid" id="HSettings" %)
620 **Settings**
621
622 (% style="text-align:center" %)
623 [[image:数据记录设置 1.png||height="533" width="848" class="img-thumbnail"]]
624
625 **Operating Procedures**
626
627 1. Click "Project"->"Data record" as below shows.
628 1. Click "Add" button to open "Data record" setting window.
629 1. Enter group name, the default is "GroupName0"
630 1. Select "Trigger function" mode, such as "No trigger".
631 1. Set "Total channels", such as 3.
632 1. Click "Apply" button.
633 1. Set Sample cycle, such as 15.
634 1. Set "Start channel" in "Quick settings", such as 4 0.
635 1. Check group information in "Channel list" as below.
636 1. Click "Save" button to complete settings.
637
638 The figure above display the group of current project. The data record file would stored in "DataLogFile" folder, and the data of every  group would have a data file. The file suffix is in "db" format.
639
640 ✎**Note: **
641
642 * For HMI series 8000 and above, the size of a single file cannot exceed 300M and the total file capacity cannot exceed 1000M.
643 * For HMI series 3000, the size of a single file cannot exceed 4M and the total file capacity cannot exceed 10M.
644 * If the total amount exceeds the range, an alarm will be given during project compilation.
645
646 (% style="text-align:center" %)
647 [[image:数据记录设置 2.png||height="572" width="850" class="img-thumbnail"]]
648
649 **(1) Group name:** Set group name, and he name should be unique.
650
651 **(2) Trigger function:** There are four modes to trigger record.
652
653 1. **No trigger: **Data will be recorded in every sample time.
654 1. **Trigger to record by sample cycle: **Data will be recorded in every same time, when trigger control bit set ON.
655 1. **Trigger to record once and reset: **Data will be recorded when trigger control bit set ON, and the bit will be reset automatically.
656 1. **Trigger to record once: **Data will be recorded when trigger control bit set ON, and the bit need to be reset manually.
657 1. **Trigger address: **It is only valid when the trigger condition is selected. The monitoring cycle for trigger sampling address is 1s.
658
659 **(3) Total channels (1~~100): **Set the numbers of channels. Click "apply" to view the channel lists on the right record channel.
660
661 **(4) Sampling cycle: **If you check "collect control address", the sampling interval is the value of the address. The unit is second. For example, Sample cycle=15s. It means that records data one time every 15s.
662
663 **Timing address:** It sets address to change sample time when HMI is running;
664
665 **(5) Total records:** It sets data record number in one data record file. If the data file size is beyond the current file size. The old data will be deleted, and the new data will replace the old data. Please remember to back up the old data record file.
666
667 **Abnormal value:** It sets a value, when communication fails, data record will record this value;
668
669 **(6) Upload to Cloud**: The data uploaded by Data Record is stored in the Cloud(Only ig series). The maximum number of record is 20.
670
671 **(7) Quick Settings**
672
673 1. **Start Channel:** It sets the continuous addresses for channels.
674 1. **Data Format: **It sets the same data format for channels.
675 1. **Number of Digits:** It sets the digits’ number for channels.
676 1. **Language Settings**: The text in HMI can be in 8 languages, user can set language in here.
677
678 **(8) Channel List**: Besides quick settings, user can set channel name, address, data format, and so on one by one according to real situation.
679
680 **✎Note:**
681
682 * After enabling the Cloud function and checking the upload to the Cloud, the communication port settings of the address in the imported Data record configuration must be the same as the communication settings of the current project, otherwise it cannot be used normally.
683 * The range of upload to the Cloud from Data record configuration must not exceed 50, or the total number of imported Data records and the number of currently existing Data records must not exceed 50. If it exceeds, it will prompt you to reconfigure, should reduce the number.
684 * The channel name can only be composed of English characters, (0~~9), (a~~z), (A~~Z), ('_'), ('').
685 * The channel name does not include these 5 special characters: ", ", "| "," <", "> "," & ".
686 * The data would be overwritten automatically if the capacity exceed the maximum capacity. For 8000/9000 series, the size of single file cannot exceed 300MB, and total capacity of data records cannot exceed 1000MB. For 3000/3000i/3000ie series, the size of single file cannot exceed 4MB, and total capacity of data records cannot exceed 10MB. If the total amount exceeds the range , an error will be prompted when the project is compiled.
687
688 You could click here to jump to object "[[Data Record Display>>https://docs.we-con.com.cn/bin/view/PIStudio/06.Objects/#HDatarecorddisplay]]"
689
690 = **User permission** =
691
692 **Introduction**
693
694 1. User permission is one of expansion function in PI Series HMI; it provides multi-level of permission for control HMI operations.
695 1. User need to set the user and group during designing project. Different groups have different permission levels for accessing. Each user should be added into the specified group; it is possible to add the same user into different groups.
696 1. Operating record: it records user operations information, the records files are saved in HMI flash; its path is [~\~\flash~\~\UserOperationLogs.db].
697 1. When it is on simulator mode, the files are saved in C disk, its path is [C:~\~\WECON\UserMgrFile\UserOperationLogs.db].
698
699 (% class="box infomessage" %)
700 (((
701 ✎**Note: **
702
703 * The user name and password must be unique. Username can be up to 32 characters, and password can be up to 8 characters.
704 * The multi language function of User permission only supported on HMI system version V2.0 or above
705 )))
706
707 == Settings ==
708
709 Open PIStudio software, then operate as the following figure.
710
711 (% style="text-align:center" %)
712 [[image:用户权限 1.png||class="img-thumbnail"]]
713
714 Click on the cell from UserName and Desc, which can support the multi language.
715
716 (% style="text-align:center" %)
717 [[image:UserPermissionMultilan.png]]
718
719 1. Click "User Permission" in "Data Tool" toolbar.
720 1. Edit user name, click "User0" cell under "UserName", and then enter the user name, one project allows maximum 20 users.
721 1. Edit password, click "User0" cell under "PassWord", and then enter the user name.
722 1. Edit description, click "User0" cell under "Desc", and then enter, description is not necessary。
723 1. Check the groups for each user, there are 11 groups beside admin.
724 1. Editing groups' description, but it is not necessary.
725 1. {{id name="OLE_LINK7"/}}{{id name="OLE_LINK6"/}}Click "Save and Exit" button to complete all settings.
726
727 (% class="box infomessage" %)
728 (((
729 ✎**Note:**
730
731 * Only a maximum of one administrator permission is allowed in a profile with one user permission. If you want to use "Funtion address" to modify the user permission, you must log in the administrator account to operate.
732 * When the configured file does not have the administrator account, a new user can be added  through "Funtion address" and set as the administrator.
733 * If you select hidden fucntion when configuring user account, the account would display as "~*~*~*~*~*~*" in the list. You only need to enter the password of the corresponding hidden user to log in.
734 * (((
735 Adding new UserName and Desc on the HMI by special addresses in the current language of the HMI, other languages will also configure the user names and user descriptions to the current language by default, i.e. switching to other languages, the new user names and user descriptions will not change with the language.
736 )))
737 )))
738
739 (((
740
741 )))
742
743 == Object permission configuration ==
744
745 (% style="text-align:center" %)
746 [[image:用户权限 2.png||class="img-thumbnail"]]
747
748 User operation logs support multi languages configuration. Click on the Log Message, the text editor of multi language will be pop up:
749
750 (% style="text-align:center" %)
751 [[image:LogMessagesMultilan.png]]
752
753 **Operation Procedure of Object Permission**
754
755 1. Open the object setting windows;
756 1. Select "Security" windows;
757 1. Check the "User Permission";
758 1. Select "Level" to set permission level;
759 1. Enter "Log Message", it is for operation records, if it was empty, the operation for this object would be not be recorded;
760 1. Select the "Access Denied Setting" mode;
761
762 **Log information description**
763
764 A combination of Chinese characters, numbers, and uppercase and lowercase letters can be entered, and the number does not exceed 63.
765
766 The format of insert variable:{variable address, data format}. e.g., {HDW100,UW2.1}.
767
768 The data format are as follows.
769
770 (% class="table-bordered" %)
771 |=Letter|=Meaning
772 |B|Binary
773 |O|Octonary
774 |U|Unsigned decimal
775 |H|Hexadecimal
776 |b|BCD
777 |F|32-bit float
778 |S|Signed decimal
779 |C|Character
780 |W|Single word
781 |D|Double word
782
783 Examples.
784
785 * Unsigned decimal, BCD, 32-bit float and Signed decimal are as follows.
786
787 {HDW100,UW2.1}:  Indicates the variable address is HDW100. The data format are: unsigned decimal, single word, two integer bits, one decimal place.
788
789 * (((
790 Binary, Octonary and Hexadecimal are as follows.
791 )))
792
793 {HDW100,HD8}: Indicates the variable address is HDW100. The data format are: hexadecimal, double word, eight integer bits.
794
795 * (((
796 Character is as follows.
797 )))
798
799 {HDW100,C32}: Indicates the variable address is HDW100. The data format are: 32 characters.
800
801 When a record is generated, the contents of this variable are replaced by the value of your corresponding address.
802
803 == **Function address** ==
804
805 A user must first log in before performing an operation, and after the login is successful, the user can perform the required operation, and log out after completing the operation, making the operation permission invalid. User login, log out, modification of user password during operation and user management and other functions need to be configured.
806
807 HMI allows managing user accounts on screen. Including adding, deleting and editing the user account. HMI provide built-in screen for [Sign in] and [change password] (screen No. 1006 and 1007).
808
809 Functions and addresses are as follows.
810
811 (% class="table-bordered" %)
812 |=**Function**|=**Address**|=**Object type**|=**Address function**
813 |(% rowspan="3" %)Sign in|HUW1158~~1335|Drop down list|User name
814 |HUW1002|Character input object|Password
815 |HUW1000|Word Switch (Input 1)|OK (sign in)
816 |(% rowspan="5" %)Change password|HUW1158~~1335|Drop down list|User name
817 |HUW1002|Character input object|Old password
818 |HUW1006|Character input object|New password
819 |HUW1010|Character input object|Confirm password
820 |HUW1000|Word Switch (Input 2)|OK(change password)
821 |Sign out|HUW1000|Word Switch (Input 3) |Sign out
822 |(% rowspan="7" %)(((
823 New user ***1**
824 )))|HUW1014|Character input object|User name
825 |HUW1006|Character input object|password
826 |HUW1010|Character input object|Confirm password
827 |HUW1000|Word Switch (Input 4) |OK(add new user)
828 |HUW1336~~1345|Character input object|User description
829 |HUX1347.0|Bit switch|(((
830 ~=1: User hidden
831
832 ~=0: Visible (Defaults)
833 )))
834 |HUW1000|Word Switch (Input 8) |Save(add Hide features)
835 |(% rowspan="2" %)(((
836 Delete user ***2**
837 )))|HUW1158~~1335|Drop down list|User name
838 |HUW1000|Word Switch (Input 5)|OK (delete user)
839 |Delete Profile|HUW1000|Word Switch (Input 9)|OK(delete)
840 |Export Profile|HUW1000|Word Switch (Input 10)|OK(export)
841 |Import profile|HUW1000|Word Switch (Input 11)|OK(import)
842 |Export log file|HUW1000|Word Switch (Input 12)|OK(export)
843 |Delete log file|HUW1000|Word Switch (Input 13)|OK (delete)
844 |Current user name|HUW1349|Character object|32 Word
845 |System state information|HUW1030|Character input object|System state information
846 |(% rowspan="3" %)Permission settings|HUW1014|Character input object|User name
847 |HUW1348|Bit switch|(((
848 Set the user group:
849
850 HUX1348.0 = 1 administrator;
851
852 HUX1348.1 = 1 group 0 permission;
853
854 HUX1348.2 = 1 group 1 permission;
855
856 (Total group 0 - group 10)
857 )))
858 |HUW1000|Word Switch (Input 6)|Add user rights (set according to HUW1348)
859 |User login mode setting|HUW1382|Word Switch/Numeric input object|(((
860 0: Select a user name from the drop-down list
861
862 1: Use character input object (address HUW1014) to log in with a user name
863 )))
864
865 When the user performs a function operation, the operation result is displayed in the HUW1001.
866
867 (% class="table-bordered" %)
868 |=**Value (HUW1001)**|=**Meaning**
869 |1|Insufficient permissions.
870 |2|Username does not exist.
871 |3|Username already exists.
872 |4|Wrong username or password.
873 |5|Login successfully.
874 |6|Passwords are inconsistent in twice time.
875 |7|Password changed successfully.
876 |8|User added successfully.
877 |9|User deleted successfully.
878 |10|Maximum number of users exceeded.
879 |11|Admin user already exists.
880 |12|User permission modified successfully.
881 |13|File imported successfully.
882 |14|File imported failed.
883 |15|File exported successfully.
884 |16|File exported failed.
885 |17|Logout successfully.
886 |18|Profile deleted successfully.
887 |19|Log file deleted successfully.
888 |20|Hide settings modified successfully.
889 |21|Hide settings modified failed.
890 |22|(((
891 Password already occupied, please reset.
892
893 (For both username and password, it can not repetition)
894 )))
895
896 (% class="box infomessage" %)
897 (((
898 **✎Note:**
899
900 * *1: If there is an admin user account, then the new user can no longer add one more admin, that is, one project can only have one administrator account.
901 * *1: When adding new user, the password could not be duplicated with other users.
902 * *2: When deleting user, it is forbidden to delete the admin user.
903 )))
904
905 **User Permission Demo Download**
906
907 [[https:~~/~~/drive.google.com/open?id=1qOiEDvo_1H1YqpoLDpS77dGaAFm8nrGq>>url:https://drive.google.com/open?id=1qOiEDvo_1H1YqpoLDpS77dGaAFm8nrGq]]
908
909 = Message prompt =
910
911 A message box is a window used to show some prompts or warnings to users. For example, the application process a task in the process of pop-up message box, suggesting that "U disk has been detected", then the customer can carry out data dump function.
912
913 (% style="text-align:center" %)
914 [[image:消息提示 2.png||class="img-thumbnail"]]
915
916 (% style="text-align:center" %)
917 [[image:8.Basic Function_html_5ce2091d6f7cd732.png||height="515" width="704" class="img-thumbnail"]]
918
919 **(1) Message**
920
921 It includes system classes (u disk, SD card, and others), chart classes (alarm, data record, recipe, file list), curve classes (Trend Chart, historical XY trend Plot).
922
923 **(2) Control**
924
925 1. **Current item: **It shows selected message information.
926 1. **Use trigger address: **When the message is triggered, the trigger address would be set ON.
927
928 **For Example:**
929
930 Trigger address is 011, during inserting a USB flash disk into HMI, and 011 would be set ON, once HMI recognizes USB flash disk, and display message.
931
932 1. **Show message: **Check it to display message when HMI is running. It is checked by default.
933 1. **Show on web: **Check it to display message when remote access HMI screen, it is unchecked by default.
934
935 **(3) Message Content**
936
937 Each message has default content, but you could set different content according to the actual situation. And the same message could be displayed in 8 languages.
938
939 **(4) Reload Text: **It means discard changes.
940
941 **For Example**
942
943 User deletes default content or modifies default content, but he wants to give up modification back to original, just click "Reload text".
944
945 (% class="box infomessage" %)
946 (((
947 **✎Note:**
948
949 * If you do not want this prompt during the running of HMI, please uncheck "Show message".
950 * "Reload text" function would be invalid after clicking "save".
951 * These 5 special characters are not supported in the header Multi language settings: ",", "|", "<", ">", "&".
952 )))
953
954 = **Cloud** =
955
956 **Introduction**
957
958 Cloud function is available for following models: the ig series and 8000/9000 series with -R after system upgrade
959
960 You may configure the basic settings of Cloud functions, tags, and User MQTT according to your needs. (If the device supports the Cloud function, you can use the function and configure the tags after checking the box to enable it, or upload the data to the 3rd party server.)
961
962 Click "Project"-"[[image:hh_B4H5OuNT87.png||height="29" width="30"]]Cloud" in the upper left corner of the software, as shown in the following figure.
963
964 (% style="text-align:center" %)
965 [[image:云配置1.png||height="494" width="750" class="img-thumbnail"]]
966
967 **(1) Enable**
968
969 If the HMI supports the Cloud function, check it to enable the Cloud function, and it will collect the real-time data from HMI upload to the Cloud. The number of data collection is limited, and the specific parameters are as follows:
970
971 |=Series|=Monitoring Tags|=Alarm Record|=Data Record|=OpenCloud Data
972 |8000-R|300|200|100|1000
973 |9000-R|300|200|100|1000
974 |3000ig|100|20|50|500
975 |8000ig|300|200|100|1000
976
977 For example:
978
979 * In 3000ig's Cloud, the monitoring tags upload to the Cloud in real time is limited to 100.
980 * For 3000ig's Alarm, the Alarm records of word alarms and bit alarms upload to Cloud is limited to 20. (See [["Alarm">>http://docs.we-con.com.cn/wiki/pistudio/view/Helps/08.Basic%20Function/#HAlarm]] for details).
981 * For 3000ig's Data record, the Data records upload to Cloud is limited to 50. (For details, please refer to [["Data Record">>http://docs.we-con.com.cn/wiki/pistudio/view/Helps/08.Basic%20Function/#HDataRecord]]).
982
983 **(2) Server Selection**
984
985 **Server**: China, ASEAN, and Europe.
986
987 **Password**:
988
989 1. If the HMI is not bound, this access password will be updated and downloaded into the HMI screen simultaneously.
990 1. If the HMI is bound, this access password in the project cannot effectively change the binding password of the device, and it can only be changed through V-NET.
991
992 **(3) Upload Selection**: 
993
994 To upload the data collected by HMI to the cloud or a to the third-party server, only one upload method can be selected.
995
996 1. **to Cloud**: All the configured tags, data records, and alarm records would be pushed to V-NET.
997 1. **to User MQTT**: All the configured tags, data records, and alarm records would be pushed to to the third-party server, and the relevant Lua function calls please refer to "[[Cloud interface>>http://docs.we-con.com.cn/wiki/pistudio/view/Helps/10.Lua/#HCloudInterface]]".
998
999 After the "to User MQTT" is checked. The tags, data records, and alarms cannot be viewed on V-NET, but the device can be bound to V-NET and remote monitoring the device screen normally.
1000
1001 **4) Low Data Mode setting**
1002
1003 1. When you check the "low Data Mod" by default on new tags, the newly added tags will be enabled in Low Data Mode by default.
1004 1. The longer the refresh interval, the slower the data upload, and the more traffic data will be saved. This function is only used for the control of tags.
1005
1006 = MQTT =
1007
1008 String table[[~[~[image:1.png~]~]>>path:mk:@MSITStore:D:\WV%20Studio20230801\HmiHelp.chm::/leviⅡ/4/4.7.htm]]: A collection entered by the user in advance, contents of table can be referenced by text object.
1009
1010 MQTT[[image:2.png]]: Configurable type MQTT. Users can publish message to the MQTT server or subscribe topics from the MQTT server.
1011
1012 **String table[[image:1.png]]**
1013
1014
1015 A collection entered by the user in advance, contents of table can be referenced by text object. The string table support eight languages at max
1016
1017 Click on the “String table” in "Library" on the upper left corner of the software, as shown in the following figure:
1018
1019 (% style="text-align:center" %)
1020 [[image:String table.jpg||height="513" width="857"]]
1021
1022 (% style="text-align:center" %)
1023 [[image:1.jpg]]
1024
1025 **String table size:**
1026
1027 ① i series, ie series, 3000ig series, General series 3000: The total number of text cannot exceed 8000, or the total size of all string tables does not exceed 1M.
1028
1029 ② General series 8000, General series 9000 and 8000ig series: The total number of texts cannot exceed 10000, or the total size of all string tables does not exceed 5M.
1030
1031 **MQTT Configuration (Common Settings/AWS IOT Settings/ALi Settings/Huawei Settings)[[image:2.png]]**
1032
1033 This chapter explains how to use configurable type MQTT. Users can publish message to the MQTT server or subscribe topics from the MQTT server.
1034
1035 Click “MQTT” in “Data Tool" in the upper side bar of the software.[[image:2.png]]After checking "Enable", the settings window will pop up and select different cloud services for MQTT configuration, as shown in the following figure:
1036
1037 (% style="text-align:center" %)
1038 [[image:MQTT.jpg||height="673" width="929"]]
1039
1040 (% style="text-align:center" %)
1041 [[image:2.jpg]]
1042
1043 **MQTT Server Settings (Common)**
1044
1045 **General**
1046
1047 (% style="text-align:center" %)
1048 [[image:3.jpg]]
1049
1050 **Description:** Enter a description or comment about the server. Maximum input length: 255 characters, cannot be empty.
1051
1052 **Cloud Service**: (Select Common)
1053
1054 ① Common (Common Platform): General MQTT publish-subscribe topic mode.
1055
1056 ② AWS IoT (Amazon): Using "AWS IoT" as the Broker, using Thing to transfer data and support Shadow function.
1057
1058 ③ ALi (Alibaba Cloud): Using "Alibaba Cloud" as Broker.
1059
1060 ④ Huawei (Huawei Cloud): Using "Huawei Cloud" as Broker.
1061
1062 **Communication protocol**: MQTTv3.1, v3.1.1 and v5 are supported.
1063
1064 **Custom Client ID length:** User can customize the length of the Client ID (optional), length range: 20 ~~128.
1065
1066 **Custom username/password length:** Customize the length of user name/password length (optional), length range: 16 ~~ 256.
1067
1068 **IP:** Set the MQTT server IP to subscribe message.
1069
1070 **Use domain name:** Support using domain name to the specify server.
1071
1072 **Domain name:** Set the domain name of the MQTT server that subscribe message. Maximum input length: 128 characters, cannot be empty, supports letters, numbers, "-", “.”. The symbol cannot be placed at the first character or last character of name.
1073
1074 **Port number:** Set the MQTT server port to subscribe message. Range: 0~~65535, cannot be empty.
1075
1076 **Client ID:** Login name. Variables can be used as login names. For example: Enter% 0 and the Client ID is the device name. (This can be set in the HMI background. If not, the default is HMI model.) **(✎Note: A Client ID can only be used for one device.)** When there is no custom Client ID length, the maximum configurable length of Client ID is 40 characters.
1077
1078 **Verification:** Choose whether to connect to the MQTT server using [User Name] and [Password].
1079
1080 **User Name:** The [User Name] connects to the MQTT server. When there is no custom username/password length, the maximum configurable length of username is 32 characters.
1081
1082 **Password:** The password for connect to the MQTT server. When there is no custom username/password length, the maximum configurable length of password is 32 characters.
1083
1084 **Timestamp:** LOCAL: Using the HMI time as the timestamp. UTC Time: Using UTC+0.
1085
1086 **Clean message cache when normal connected:** If option is enabled, when the device is disconnected, the message to be published will be cached in the cache area, and then will be published when the device is online again.
1087
1088
1089 **Address**
1090
1091 (% style="text-align:center" %)
1092 [[image:4.jpg]]
1093
1094 **Status address: (Total length: 2 words)**
1095
1096 HDWn: Display [MQTT] connection status.
1097
1098 |Value|Description
1099 |0|Disable MQTT server connection
1100 |1|Disconnected or connecting
1101 |2|Successfully connected the MQTT server
1102
1103 HDWn+1: Error prompt
1104
1105 |Value|Description
1106 |0|No error
1107 |-1|General error code of wrong operation
1108 |-3|Disconnected
1109 |-4|Exceed client data concurrency
1110 |-5|Invalid UTF-8 string
1111 |-6|Null pointer parameter
1112 |-7|Topic name is truncated
1113 |-8|Wrong protocol structure body
1114 |-9|Bad QoS, acceptable range is (0, 1, 2)
1115 |-10|Try to use a non-SSL version library for SSL connection
1116 |-11|Wrong MQTT version
1117 |-14|Wrong protocol type
1118 |-15|Option is not suitable for the current request version
1119 |-16|Call MQTT version that is not applicable to request.
1120 |-17|0 length connects topics
1121
1122 **Buffer usage address: (Total length: 1 word)**
1123
1124 Unsuccessful published message will be stored in memory as cache, with a maximum 100,000 messages. Value display as unit %, and it is carried unconditionally.
1125
1126 HDWn: Display buffer usage.
1127
1128 **Control address: (Total length: 123 words; If the domain name is not enabled, it will take up 59 words)**
1129
1130 HDWn: Control the execution or stop of [MQTT Server].
1131
1132 |Value|Description
1133 |0|Ready
1134 |1|Start
1135 |2|Stop
1136 |3|Update
1137
1138 HDWn+1: IP address of the MQTT server. (✎**Note: This address is only valid when IP is used.**)
1139
1140 HDWn+5: Port number of the MQTT server.
1141
1142 HDWn+6: Client ID of the MQTT server connection.
1143
1144 HDWn+26: Authentication is enabled or not. = 0, disabled; = 1, enabled.
1145
1146 HDWn+27: User name of MQTT server connection.
1147
1148 HDWn+43: Password of MQTT server connection.
1149
1150 HDWn+59: Domain name of the MQTT server. (**✎Note: This address is only valid if the domain name is used.**)
1151
1152
1153 **TLS/SSL Settings**
1154
1155 (% style="text-align:center" %)
1156 [[image:5.jpg]]
1157
1158 **Enable:** Enable TLS/SSL encryption. User can manually select encrypted versions of TLS 1.0, TLS 1.1, or TLS 1.2.
1159
1160 **Server authentication:**
1161
1162 Enable: Verify whether the server certificate has been certified by a Certificate Authority Certificate (CA). Server certificates are sent by the server when connection is established.
1163
1164 Import: Select CA certificate to import.
1165
1166 More: After the import is successful, clicking it will display the certificate details.
1167
1168 Reset: Reset the import information.
1169
1170 The server name must match the certificate information: Verify whether the server name or IP matches with the information in the certificate. Domain name and IP are recorded in the Subject Alternative Name from certificate.
1171
1172 **Client authentication:** The private key and client certificate are the data required for the server to authenticate the client end.
1173
1174 Certificate:
1175
1176 Import: Select certificate to import.
1177
1178 More: After the import is successful, clicking it will display the certificate details.
1179
1180 Reset: Reset the import information.
1181
1182 Key:
1183
1184 Import: Select the key to import.
1185
1186 More: After the import is successful, clicking it will display key details.
1187
1188 Reset: Reset the import information.
1189
1190
1191 **System topics**
1192
1193 (% style="text-align:center" %)
1194 [[image:6.jpg]]
1195
1196 **Birth Topic: **The message that HMI will publish when it is connected to server.
1197
1198 **Close Topic:** The last send message before HMI actively disconnects from server connection
1199
1200 **Last Will: **Subscription of Last Will receive this message when an abnormal disconnection occurs between HMI and the server. HMI synchronizes the Last Will message to the server when it initially establishes the connection.
1201
1202 **Topic List:** A list of topics in the HMI that is sent to the server after the HMI is connected to the server.
1203
1204 **Topic:** The actual topic name of the system topic. Maximum input length: 255 characters, cannot be empty.
1205
1206 **Retain message: **The MQTT server keeps the latest message.
1207
1208 **QoS: **MQTT provides three levels of reliability called service quality. The service quality of message transmission determines whether the message is guaranteed to be delivered.
1209
1210 QoS 0: Messages are sent only once, and delivery is not guaranteed.
1211
1212 QoS 1: Message must be delivered at least once.
1213
1214 QoS 2: Message is delivered just once.
1215
1216 **Content format:**
1217
1218 **JSON (Default):** Use default values, default values for each system topic (**The bold is represented as the current actual value**)
1219
1220 **Birth Topic:** 
1221 {
1222 "d": {
1223 "connected": true
1224 },
1225 "ts": " **Current time**"
1226 }**Close Topic: **
1227 {
1228 "d": {
1229 "connected": false
1230 },
1231 "ts": " **Current time**"
1232 }**Last Will: **
1233 {
1234 "d": {
1235 "connected": false
1236 }
1237 }**Topic list:** 
1238 {
1239 "d": {
1240 "topics": [
1241 {
1242 "compression": "
1243
1244
1245 ",
1246
1247 "nickname": "**Subject name**",
1248
1249 "topic": "**Theme**"
1250 },
1251 {
1252 "compression": "**Compression type**",
1253
1254 "nickname": "**Subject nam**e",
1255
1256 "topic": "**Theme**"
1257 }
1258 ]
1259 },
1260 "ts": "**Current time**"
1261 }
1262
1263 Messages within topics vary depending on the actual topic settings. The above is an example of two topics.
1264
1265 **JSON (Customized):** Use custom content.
1266
1267 **Choose the connection network card**
1268
1269 (% style="text-align:center" %)
1270 [[image:7.jpg]]
1271
1272 **Default:** According to the priority order of network adapters set in the HMI background to connect server.
1273
1274 **Ethernet 1: **Specify Ethernet 1 network card to connect to the server. When the system does not find Ethernet 1, connect to the server by “Default”. When system finds Ethernet 1 and binds it to connect to the server.
1275
1276 **Ethernet 2: **Specify Ethernet 2 network card to connect to the server. When the system does not find Ethernet 2, connect to the server by “Default”. When system finds Ethernet 2 and binds it to connect to the server.
1277
1278 **4G:** Specify 4G network card to connect to server. When the system does not find 4G, connect to the server by “Default”. When system finds 4G and binds it to connect to the server.
1279
1280 **Wi-Fi:** Specify Wi-Fi network card to connect to server. When the system does not find Wi-Fi, connect to the server by “Default”. When the system finds Wi-Fi and bind it to connect to the server.
1281
1282
1283 **MQTT Topic**
1284
1285 **MQTT topic publish**
1286
1287 Select [Topic publish], click [Add], enter [Add MQTT topic publish object], and set the general settings and address. The maximum number of MQTT published topics is 255.
1288
1289 (% style="text-align:center" %)
1290 [[image:8.jpg]]
1291
1292 **General properties**
1293
1294 (% style="text-align:center" %)
1295 [[image:9.jpg]]
1296
1297 **Alias:** Set the project name of the MQTT topic. Maximum input length: 255 characters, cannot be empty.
1298
1299 **Topic:** The topic received by the MQTT server when sending message. Maximum input length: 255 characters, cannot be empty.
1300
1301 Sending mode: (AUTO/TRIGGER)
1302
1303 **① AUTO **value change mode: When any value changes, MQTT message is published.
1304
1305 a. Minimum time interval between messages: The minimum time interval can be set between messages to avoid over-publishing MQTT messages. When the interval of value change is less than the minimum time interval between messages, the message will be put in the cache. The MQTT message will not be published until the minimum interval between messages is met. Range: 0~~3600000ms.
1306
1307 b. Periodic mode: Publish MQTT message by the fixed time. Time interval: Set the time interval for periodic publishing. The range is 1~~3600s.
1308
1309 **② TRIGGER**
1310
1311 When the specified bit is triggered, the MQTT message is published. When HDX0.0 changes from OFF to ON, an MQTT message is published, and HDX0.0 is automatically set to OFF after publishing.
1312
1313 **Compression type:** Message is compressed before it is transmitted. The compressed message needs to be decompressed before the MQTT client reads it. Zilb, Gzip, or Deflate algorithm can be chosen to compress or decompress the message.
1314
1315 **QoS:** MQTT provides three levels of reliability called service quality. The service quality of message transmission determines whether the message is guaranteed to be delivered.
1316
1317 0: Messages are sent only once, and delivery is not guaranteed.
1318
1319 1: Message must be delivered at least once.
1320
1321 2: Message is delivered just once.
1322
1323 **Retain message: **When checked, the MQTT server keeps the latest message.
1324
1325 **Content format:**
1326
1327 Raw data: Data composed of BYTE data.
1328
1329 JSON (General): Put all data in JSON format of member "d".
1330
1331 JSON (Advanced): JSON format of flexibly customizable nested structure.
1332
1333 **Include timestamps:** This function is only supported when the content format uses [JSON (General)], and whether to include the timestamp can be decided manually.
1334
1335 **Use the top "d" symbol in the message format:**
1336
1337 This function is only supported when the content format uses [JSON (General)]. When checked, the message format is as follows:
1338
1339 {
1340
1341 "d": {
1342
1343 "addressName1": ...,
1344
1345 "addressName2":...
1346
1347 },
1348
1349 "ts":...
1350
1351 }
1352
1353 When unchecked, the message format is as follows:
1354
1355 {
1356
1357 "addressName1": ...,
1358
1359 "addressName2":...,
1360
1361 "ts":...
1362
1363 }
1364
1365 As shown above, when unchecked, ts and address names are both key at the same level. Therefore, avoid taking the address name as ts.
1366
1367 **Address setting**
1368
1369 ①Address settings when content formats use [Raw Data] and [JSON (General)].
1370
1371 (% style="text-align:center" %)
1372 [[image:10.jpg]]
1373
1374 **Add:** Establish the address source of the topic. The length of each address can be set separately.
1375
1376 **Delete:** Delete the address.
1377
1378 **Settings:** Modify the address and name.
1379
1380 (% style="text-align:center" %)
1381 [[image:11.jpg]]
1382
1383 **Included in all message sent**
1384
1385 Check the options: This topic will include this address every time it publishes a message.
1386
1387 Uncheck the options: When the sending mode is value, message is published only when the value of the address changes.
1388
1389 **Remove JSON array brackets' ['and'] ':**
1390
1391 Check the options: Remove the array symbol name when using non-array bits or characters.
1392
1393 **✎Note: A topic can be configured up to 255 nodes. The name length of a node can be configured up to a maximum of 255 characters and cannot be empty.**
1394
1395 ② Address setting when the content format uses [JSON (Advanced)]. [JSON (Advanced)] supports nested structure, which can use components, arrays and other forms. Timestamps and data names can also be customized, which is a more flexible design method.
1396
1397 (% style="text-align:center" %)
1398 [[image:12.jpg]]
1399
1400 The above figure is an example. If setting like above figure, the subscription side will receive the MQTT message like following format.
1401
1402 {
1403 "object": {
1404 "value": "teststring",
1405 "value (1)": 123,
1406 "value (2)": true,
1407 "value (3)": "",
1408 "value (4)": 0,
1409 "value (5)": true
1410 },
1411 "array": [
1412 10,
1413 20,
1414 30
1415 ],
1416 "value (6)": " 2023-04-27T03: 53: 20.156271 "
1417 }
1418
1419 **New component:** Add a new data component. Components can have multiple data formats; each data format has its own Name and Value. The data of the component is included in braces {}.
1420
1421 **New value:** Add a new value, string, or timestamp. When it is a value or a string, it can be fixed value or read data from a specified address.
1422
1423 **Delete:** Delete the selected field.
1424
1425 **Settings:** Modify the selected field. If the selected fields are components and arrays, only the names can be modified. But components and arrays include values that can modify parameters.
1426
1427 **Template:** Paste the JSON text here, and the system will automatically arrange the style to conform to this JSON format, saving the time of self-definition.
1428
1429 **Preview:** Preview JSON data in an easy-to-read format.
1430
1431 **✎Note: A Topic can be up to 512 nodes (including payload), and a node name can be configured to be up to 255 characters length.**
1432
1433 **Security settings**
1434
1435 The topic is published only when the register status matches the setting. As shown in the following figure, this topic will not be published until the address HDX0.0 is set to ON.
1436
1437 (% style="text-align:center" %)
1438 [[image:13.jpg]]
1439
1440 **MQTT topic subscription**
1441
1442 Select [Topic subscription] and click [Add] to enter general property settings and address settings. The maximum number of MQTT subscription topics is 255.
1443
1444 (% style="text-align:center" %)
1445 [[image:14.jpg]]
1446
1447 **General properties**
1448
1449 (% style="text-align:center" %)
1450 [[image:15.jpg]]
1451
1452 **Alias:** Set the project name of the MQTT topic. Maximum input length: 255 characters, cannot be empty.
1453
1454 **Topic:** Topics subscribed from the MQTT server. Maximum input length: 255 characters, cannot be empty.
1455
1456 **Compression type:** The transport compression type of a subscription topic must be the same as that of a publication topic.
1457
1458 **QoS:** MQTT provides three levels of reliability called service quality. The service quality of message transmission determines whether the message is guaranteed to be delivered.
1459
1460 0: Messages are sent only once, and delivery is not guaranteed.
1461
1462 1: Message must be delivered at least once.
1463
1464 2: Message is delivered just once.
1465
1466 **Content format:**
1467
1468 Raw data: There is no original data in a specific format.
1469
1470 JSON (General): JSON format of single-layer structure.
1471
1472 JSON (Advanced): JSON format of flexibly customizable nested structure.
1473
1474 **Verify timestamp:** The user can decide whether to verify the timestamp or not. When checked, it indicates that the received data timestamp must be strictly incremented before it can be updated. Otherwise, it will be judged as outdated data and not updated.
1475
1476 **Use the top "d" symbol in the message format:**
1477
1478 This function is only supported when the content format uses [JSON (General)]. When checked, the message format is as follows:
1479
1480 {
1481
1482 "d": {
1483
1484 "addressName1": ...,
1485
1486 "addressName2":...
1487
1488 },
1489
1490 "ts":...
1491
1492 }
1493
1494 When unchecked, the message format is as follows:
1495
1496 {
1497
1498 "addressName1": ..., "addressName2":...,
1499
1500 "ts":...
1501
1502 }
1503
1504 Please select the appropriate settings according to the data source.
1505
1506 **Address settings**
1507
1508 ①Address settings when content formats use [Raw Data] and [JSON (General)].
1509
1510 (% style="text-align:center" %)
1511 [[image:16.jpg]]
1512
1513 **Add:** Establish the address where the data is stored after the topic is subscribed, and the length of each address can be set separately.
1514
1515 **Delete:** Delete the address.
1516
1517 **Settings:** Modify the address and name.
1518
1519 (% style="text-align:center" %)
1520 [[image:17.jpg]]
1521
1522 **Remove JSON array brackets' ['and'] ':**
1523
1524 When using non-array bits or characters, array symbol can manually be removed.
1525
1526 **✎Note: A topic can be configured up to 255 nodes. The name length of a node can be configured up to a maximum of 255 characters and cannot be empty.**
1527
1528 ② Address setting when the content format uses [JSON (Advanced)]. [JSON (Advanced)] supports nested structure, which can use components, arrays and other forms. Timestamps and data names can also be customized, which is a more flexible design method.
1529
1530 (% style="text-align:center" %)
1531 [[image:18.jpg]]
1532
1533 **New component:** Add a new data component. There can be multiple data formats in a component, each with a name and a value. The data of the component is included in braces {}.
1534
1535 **New Array:** Add a new data array. Arrays can have multiple data formats, but only one name. The data of the component is included in brackets [].
1536
1537 **New value:** Add a new value, string, or timestamp. When it is a value or a string, it can be fixed value or read data from a specified address.
1538
1539 **Delete:** Delete the selected field.
1540
1541 **Settings:** Modify the selected field. If the selected fields are components and arrays, only the names can be modified. But components and arrays include values that can modify parameters.
1542
1543 **Template:** Paste the JSON text here, and the system will automatically arrange the style to conform to this JSON format, saving the time of self-definition.
1544
1545 **Preview:** Preview JSON data in an easy-to-read format.
1546
1547 **✎Note: A Topic can be up to 512 nodes (including payload), and a node name can be configured to be up to 255 characters length.**
1548
1549 **(3) Security settings**
1550
1551 The topic is published only when the register status matches the setting. As shown in the following figure, this topic will not be published until the address HDX0.0 is set to ON.
1552
1553 (% style="text-align:center" %)
1554 [[image:19.jpg]]
1555
1556 **MQTT Server Settings (AWS IOT)**
1557
1558 **General**
1559
1560 (% style="text-align:center" %)
1561 [[image:20.jpg]]
1562
1563 **Description:** Enter a description or comment about the server. Maximum input length: 255 characters, cannot be empty.
1564
1565 **Cloud service description**: (Select AWS IOT)
1566
1567 ① Common (Common Platform): General MQTT publish-subscribe topic mode.
1568
1569 ② AWS IoT (Amazon): Using "AWS IoT" as the Broker, using Thing to transfer data and support Shadow function.
1570
1571 ③ ALi (Alibaba Cloud): Using "Alibaba Cloud" as Broker.
1572
1573 ④ Huawei (Huawei Cloud): Using "Huawei Cloud" as Broker.
1574
1575 **Communication protocol**: MQTT v3.1.1 is supported.
1576
1577 **Domain name:** Set the domain name of the MQTT server that receives message. (Obtained from the AWS IOT platform) Maximum input length: 128 characters, cannot be empty, supports letters, numbers, "-", “.”. The symbol cannot be placed at the first character or last character of name.
1578
1579 **Port number:** Set the MQTT server port to receive message. Range: 0~~65535, cannot be empty. (AWS IOT platform is generally 8883).
1580
1581 **Client ID:** Login name. Variables can be used as login names. For example: Enter %0 and the Client ID is the device name (This can be set in the HMI background. If not, the default is HMI model). **(✎Note: A Client ID can only be used on one device.)** The maximum configurable length is 40 characters.
1582
1583 **Timestamp:** LOCAL: Using the HMI time as the timestamp. UTC Time: Using UTC+0.
1584
1585
1586 **Address**
1587
1588 (% style="text-align:center" %)
1589 [[image:21.jpg]]
1590
1591 **Status address: (Total length: 2 words)**
1592
1593 HDWn: Display [MQTT] connection status.
1594
1595 |Value|Description
1596 |0|Disable MQTT server connection
1597 |1|Disconnected or connecting
1598 |2|Successfully connected the MQTT server
1599
1600 HDWn+1: Error prompt
1601
1602 |Value|Description
1603 |0|No error
1604 |-1|General error code of wrong operation
1605 |-3|Disconnected
1606 |-4|Exceed client data concurrency
1607 |-5|Invalid UTF-8 string
1608 |-6|Null pointer parameter
1609 |-7|Topic name is truncated
1610 |-8|Wrong protocol structure body
1611 |-9|Wrong QOS.  (0, 1, 2) is acceptable.
1612 |-10|Attempt to use a non-SSL library for SSL connection
1613 |-11|Wrong MQTT version
1614 |-14|Wrong protocol type
1615 |-15|Option is not suitable for the current request version
1616 |-16|Call MQTT version that is not applicable to request.
1617 |-17|0 length topic connection
1618
1619 **Buffer usage address:** Not available.
1620
1621 **Control address: (Total length: 90 words)**
1622
1623 HDWn: Control the execution or stop of [MQTT Server].
1624
1625 |Value|Description
1626 |0|Ready
1627 |1|Start
1628 |2|Stop
1629 |3|Update
1630
1631 HDWn+1: Reserved for use.
1632
1633 HDWn+5: Port number of the AWS IOT connection.
1634
1635 HDWn+6: Client ID of the AWS IOT connection.
1636
1637 HDWn+26: Domain name of the AWS IOT connection. 
1638
1639 **TLS/SSL Settings**
1640
1641 (% style="text-align:center" %)
1642 [[image:22.jpg]]
1643
1644 **Enable:**
1645
1646 Enabled by default. The default is TLS V1.2.
1647
1648 **Server authentication:**
1649
1650 Enabled by default: Verify whether the server certificate has been certified by a Certificate Authority Certificate (CA). Server certificates are sent by the server when connection is established.
1651
1652 Import: Select CA certificate to import.
1653
1654 More: After the import is successful, clicking it will display the certificate details.
1655
1656 Reset: Reset the import information.
1657
1658 The server name must be matched with the certificate information to verify whether the server name or IP matches the records in the certificate. Domain name and IP are recorded in the Subject Alternative Name in the certificate.
1659
1660 **(3) Client authentication:** The private key and client certificate are the data required for the server to authenticate the client end.
1661
1662 Certificate:
1663
1664 Import: Select certificate to import.
1665
1666 More: After the import is successful, clicking it will display the certificate details.
1667
1668 Reset: Reset the import information.
1669
1670 Key:
1671
1672 Import: Select the key to import.
1673
1674 More: After the import is successful, clicking it will display key details.
1675
1676 Reset: Reset the import information.
1677
1678
1679 **Device setting**
1680
1681 Select [Add] to enter [General property settings and address settings]. To delete a device, select the device and click Delete.
1682
1683 (% style="text-align:center" %)
1684 [[image:23.jpg]]
1685
1686 **General**
1687
1688 (% style="text-align:center" %)
1689 [[image:24.jpg]]
1690
1691 **Device name:** It is consistent with the item name on AWS IOT. Maximum input length: 128 characters, cannot be empty, supports letters, numbers, "-", "_".
1692
1693 **Description:** For distinguish purpose. Maximum input length: 255 characters.
1694
1695 **Minimum time interval between messages:** The minimum time interval can be set between messages to avoid over-publishing MQTT messages. That is, when the interval of value change is less than the minimum time interval between messages, the message will be put in the cache, and the MQTT message will not be released until the minimum time interval between messages is met. Range: 0~~3600000ms.
1696
1697 **QoS:** MQTT provides three levels of reliability called service quality. The service quality of message transmission determines whether the message is guaranteed to be delivered.
1698
1699 0: Messages are sent only once, and delivery is not guaranteed.
1700
1701 1: Message must be delivered at least once.
1702
1703 2: Message is delivered just once.
1704
1705 **Content format:** Not configurable. All data is in JSON format.
1706
1707 **Include timestamps:** Whether to include the timestamp can be decided manually.
1708
1709 **Use the top "d" symbol in the message format:**
1710
1711 This function is only supported when the content format uses [JSON (General)]. When checked, the message format is as follows:
1712
1713 {
1714
1715 "d": {
1716
1717 "addressName1": ...,
1718
1719 "addressName2":...
1720
1721 },
1722
1723 "ts":...
1724
1725 }
1726
1727 When unchecked, the message format is as follows:
1728
1729 {
1730
1731 "addressName1": ...,
1732
1733 "addressName2":...,
1734
1735 "ts":...
1736
1737 }
1738
1739 As shown above, when unchecked, ts and address names are both key at the same level. Therefore, avoid taking the address name as ts.
1740
1741 **Address**
1742
1743 (% style="text-align:center" %)
1744 [[image:25.jpg]]
1745
1746 **Add:** Establish the address source of the topic. The length of each address can be set separately.
1747
1748 **Delete:** Delete the address.
1749
1750 **Settings:** Modify the address and name.
1751
1752 (% style="text-align:center" %)
1753 [[image:26.jpg]]
1754
1755 **Advanced Mode:**
1756
1757 Check the options: Check to configure four “Settings/Status".
1758
1759 Uncheck the options: Check to configure two "Settings/Status".
1760
1761 **Name:** Correspond to the key value in JSON.
1762
1763 **Type:** “Bit" and “Word” are optional. “Word” configuration can choose system of numeration.
1764
1765 **Length:**
1766
1767 Length 1: General JSON format.
1768
1769 Length > 1: Enable the format of JSON array. The values of continuous address with the configuration address as the first address as the elements of the array. This length is valid to the selected "settings/status”. (For example, the length is set to 3, and 4 "settings/states" are checked, so the length of these 4 are all 3). Range: 1-255.
1770
1771 For example, configure as the following figure:
1772
1773 (% style="text-align:center" %)
1774 [[image:27.jpg]]
1775
1776 Then HDW0, HDW2 and HDW4 will be read and published to the reported key; HDW10, HDW12, HDW14 will be read and published to the desired key. For example, if HDW0=1, HDW2=2, HDW4=3, HDW10=4, HDW12=5, and HDW14=6, the subscribed message format is as follows.
1777
1778 {
1779
1780 "state": {
1781
1782 "desired": {
1783
1784 "welcome": [1, 2, 3]
1785
1786 },
1787
1788 "reported": {
1789
1790 "welcome": [4, 5, 6]
1791
1792 }
1793
1794 }
1795
1796 }
1797
1798 **Status (Device address~-~->AWS IOT "reported"):** Pass a value from the Device address to the AWS IOT “reported” in one direction, which is equivalent to publishing to "reported".
1799
1800 **Setting (Device address->AWS IOT "desired"):** Pass a value from the Device address to the AWS IOT “desired” in one direction, which is equivalent to publishing to “desired".
1801
1802 **Status (AWS IOT "reported"->Device address):** Pass a value from AWS IOT "reported" to Device address in one direction, which is equivalent to subscribing to "reported".
1803
1804 **Settings (AWS IOT "desired"->Device address):** Pass a value from the AWS IOT "desired" to the Device address in one direction, which is equivalent to subscribing to "desired".
1805
1806 **Remove JSON array brackets' ['and'] ':** Check to remove array symbols when using non-array bits or characters. (Configurable when length is 1).
1807
1808 **MQTT Server Settings (ALi)**
1809
1810 **General**
1811
1812 (% style="text-align:center" %)
1813 [[image:28.jpg]]
1814
1815 **Description:** Enter a description or comment about the server. Maximum input length: 255 characters, cannot be empty.
1816
1817 **Cloud service description**: (Select Ali)
1818
1819 ① Common (Common Platform): General MQTT publish-subscribe topic mode.
1820
1821 ② AWS IoT (Amazon): Using "AWS IoT" as the Broker, using Thing to transfer data and support Shadow function.
1822
1823 ③ ALi (Alibaba Cloud): Using "Alibaba Cloud" as Broker.
1824
1825 ④ Huawei (Huawei Cloud): Using "Huawei Cloud" as Broker.
1826
1827 **Communication protocol**: MQTTv3.1, v3.1.1 and v5 are supported.
1828
1829 **Domain name:** Set the domain name of the MQTT server that receives message. Maximum input length: 128 characters, cannot be empty, supports letters, numbers, "-", “.”. The symbol cannot be placed at the first character or last character of name.
1830
1831 **Port number:** Set the MQTT server port to subscribe message. Range: 0~~65535, cannot be empty.
1832
1833 **Client ID:** Login name. Variables can be used as login names. For example: Enter %0 and the Client ID is the device name (This can be set in the HMI background. If not, the default is HMI model). (Note: A Client ID can only be used for one device.) When there is no custom Client ID length, the maximum configurable length of a Client ID is 64 characters.
1834
1835 **ProductId:** The key of the product to which the device belongs, that is, the globally unique identifier issued by the IoT platform for the product. (Obtained from Alibaba Cloud Platform) Maximum input length: 128 characters.
1836
1837 **DeviceId:** Unique identifier of the device within the product. DeviceName is combined with ProductKey of the product to which the device belongs as the device identification, which is used for connection authentication and communication with the IoT platform. (Obtained from Alibaba Cloud Platform) Maximum input length: 64 characters.
1838
1839 **DeviceSecret:** The device key issued by the IoT platform for devices is used for authentication and encryption. It needs to be used in pairs with DeviceName. (Obtained from Alibaba Cloud Platform) Maximum input length: 128 characters.
1840
1841 **Encryption algorithm:** Alibaba Cloud's signature algorithm type supports hmacmd5 and hmacsha1.
1842
1843 **Timestamp:** LOCAL: Using the HMI time as the timestamp. UTC Time: Use UTC+0 time.
1844
1845 **Clean message cache when normal connected:** If option is enabled, when the device is disconnected, the message to be published will be cached in the cache area, and then will be published when the device is online again.
1846
1847
1848 **Address**
1849
1850 (% style="text-align:center" %)
1851 [[image:29.jpg]]
1852
1853 **Status address: (Total length: 2 words)**
1854
1855 HDWn: Display [MQTT] connection status.
1856
1857 |Value|Description
1858 |0|Disable MQTT server connection
1859 |1|Disconnected or connecting
1860 |2|Successfully connected the MQTT server
1861
1862 HDWn+1: Error prompt
1863
1864 |Value|Description
1865 |0|No error
1866 |-1|General error code of wrong operation
1867 |-3|Disconnected
1868 |-4|Exceed client data concurrency
1869 |-5|Invalid UTF-8 string
1870 |-6|Null pointer parameter
1871 |-7|Topic name is truncated
1872 |-8|Wrong protocol structure body
1873 |-9|Wrong QOS.  (0, 1, 2) is acceptable.
1874 |-10|Attempt to use a non-SSL library for SSL connection
1875 |-11|Wrong MQTT version
1876 |-14|Wrong protocol type
1877 |-15|Option is not suitable for the current request version
1878 |-16|Call MQTT version that is not applicable to request.
1879 |-17|0 length topic connection
1880
1881 **Buffer usage address: (Total length: 1 word)**
1882
1883 Unsuccessful published message will be stored in memory as cache, with a maximum 100,000 messages. Value display as unit %, and it is carried unconditionally.
1884
1885 HDWn: Display buffer usage.
1886
1887 **Control address: (Total length: 258 words)**
1888
1889 HDWn: Control the execution or stop of [MQTT Server].
1890
1891 |Value|Description
1892 |0|Ready
1893 |1|Start
1894 |2|Stop
1895 |3|Update
1896
1897 HDWn+1: Port number of the Alibaba Cloud connection.
1898
1899 HDWn+2: Domain name title of the Alibaba Cloud connection.
1900
1901 HDWn+66: Client ID of the Alibaba Cloud connection.
1902
1903 HDWn+98: ProductId of the Alibaba Cloud connection.
1904
1905 HDWn+162: DeviceId of the Alibaba Cloud connection.
1906
1907 HDWn+194: DeviceSecret of the Alibaba Cloud connection.
1908
1909 **TLS/SSL Settings**
1910
1911 (% style="text-align:center" %)
1912 [[image:30.jpg]]
1913
1914 **Enable:** Enable TLS/SSL encryption. User can manually select encrypted versions of TLS 1.0, TLS 1.1, or TLS 1.2.
1915
1916 **Server authentication:**
1917
1918 Enable: Verify whether the server certificate has been certified by a Certificate Authority Certificate (CA). Server certificates are sent by the server when connection is established.
1919
1920 Import: Select CA certificate to import.
1921
1922 More: After the import is successful, clicking it will display the certificate details.
1923
1924 Reset: Reset the import information.
1925
1926 The server name must be matched with the certificate information to verify whether the server name or IP matches the records in the certificate. Domain name and IP are recorded in the Subject Alternative Name in the certificate.
1927
1928 **(3) Client authentication:** The private key and client certificate are the data required for the server to authenticate the client end.
1929
1930 Certificate:
1931
1932 Import: Select certificate to import.
1933
1934 More: After the import is successful, clicking it will display the certificate details.
1935
1936 Reset: Reset the import information.
1937
1938 Key:
1939
1940 Import: Select the key to import.
1941
1942 More: After the import is successful, clicking it will display key details.
1943
1944 Reset: Reset the import information.
1945
1946
1947 **MQTT Topic**
1948
1949 (% class="wikigeneratedid" id="H1.MQTTtopicpublish" %)
1950 **MQTT topic publish**
1951
1952 Select [Topic publish], click [Add], enter [Add MQTT topic publish object], and set the general settings and address. The maximum number of MQTT published topics is 255.
1953
1954 (% style="text-align:center" %)
1955 [[image:31.jpg]]
1956
1957 **General properties**
1958
1959 (% style="text-align:center" %)
1960 [[image:32.jpg]]
1961
1962
1963 **Alias:** Set the project name of the MQTT theme. Maximum input length: 255 characters, cannot be empty.
1964
1965 **Topic:** The topic received by the MQTT server when sending message. Maximum input length: 255 characters, cannot be empty.
1966
1967 **Sending mode:** **(AUTO/TRIGGER)**
1968
1969 **① AUTO **value change mode: When any value changes, MQTT message is published.
1970
1971 a. Minimum time interval between messages: The minimum time interval can be set between messages to avoid over-publishing MQTT messages. When the interval of value change is less than the minimum time interval between messages, the message will be put in the cache. The MQTT message will not be published until the minimum interval between messages is met. Range: 0~~3600000ms.
1972
1973 b. Periodic mode: Publish MQTT message by the fixed time. Time interval: Set the time interval for periodic publishing, ranging from 1 to 3600s.
1974
1975 **② TRIGGER**
1976
1977 When the specified bit is triggered, the MQTT message is published. When HDX0.0 changes from OFF to ON, an MQTT message is published, and HDX0.0 is automatically set to OFF after publishing.
1978
1979 **Compression type:** Message is compressed before it is transmitted. The compressed message needs to be decompressed before the MQTT client reads it. Zlib, Gzip, or Deflate algorithm can be chosen to compress or decompress the message.
1980
1981 **QoS:** MQTT provides three levels of reliability called service quality. The service quality of message transmission determines whether the message is guaranteed to be delivered.
1982
1983 0: Messages are sent only once, and delivery is not guaranteed.
1984
1985 1: Message must be delivered at least once.
1986
1987 2: Message is delivered just once.
1988
1989 **Retain message:** When checked, the MQTT server will keep the latest message.
1990
1991 **Content format:**
1992
1993 Raw data: Data composed of BYTE data.
1994
1995 JSON (General): Put all data in JSON format of member "d".
1996
1997 JSON (Advanced): JSON format of flexibly customizable nested structure.
1998
1999 **Include timestamps:** This function is only supported when the content format uses [JSON (General)], and whether to include the timestamp can be decided manually.
2000
2001 **Use the top "d" symbol in the message format:**
2002
2003 This function is only supported when the content format uses [JSON (General)]. When checked, the message format is as follows:
2004
2005 {
2006
2007 "d": {
2008
2009 "addressName1": ...,
2010
2011 "addressName2":...
2012
2013 },
2014
2015 "ts":...
2016
2017 }
2018
2019 When unchecked, the message format is as follows:
2020
2021 {
2022
2023 "addressName1": ...,
2024
2025 "addressName2":...,
2026
2027 "ts":...
2028
2029 }
2030
2031 As shown above, when unchecked, ts and address names are both key at the same level. Therefore, avoid taking the address name as ts.
2032
2033
2034 **Address setting**
2035
2036 ①Address settings when content formats use [Raw Data] and [JSON (General)].
2037
2038 (% style="text-align:center" %)
2039 [[image:33.jpg]]
2040
2041 **Add:** Establish the address source of the topic. The length of each address can be set separately.
2042
2043 **Delete:** Delete the address.
2044
2045 **Settings:** Modify the address and name.
2046
2047 (% style="text-align:center" %)
2048 [[image:34.jpg]]
2049
2050 **Included in all message sent**
2051
2052 Check the options: This topic will include this address every time it publishes a message.
2053
2054 Uncheck the options: When the sending mode is value, message is published only when the value of the address changes.
2055
2056 **Remove JSON array brackets' ['and'] ':**
2057
2058 Check the options: Remove the array symbol name when using non-array bits or characters.
2059
2060 **✎Note: A topic can be configured up to 255 nodes. The name length of a node can be configured up to a maximum of 255 characters and cannot be empty.**
2061
2062 ② Address setting when the content format uses [JSON (Advanced)]. [JSON (Advanced)] supports nested structure, which can use components, arrays and other forms. Timestamps and data names can also be customized, which is a more flexible design method.
2063
2064 (% style="text-align:center" %)
2065 [[image:HMIEditor_Db5tLtioq7.jpg]]
2066
2067 The above figure is an example. If setting like above figure, the subscription side will receive the MQTT message like following format.
2068
2069 {
2070 "object": {
2071 "value": "teststring",
2072 "value (1)": 123,
2073 "value (2)": true,
2074 "value (3)": "",
2075 "value (4)": 0,
2076 "value (5)": true
2077 },
2078 "array": [
2079 10,
2080 20,
2081 30
2082 ],
2083 "value (6)": " 2023-04-27T03: 53: 20.156271 "
2084 }
2085
2086 **New component:** Add a new data component. Components can have multiple data formats; each data format has its own Name and Value. The data of the component is included in braces {}.
2087
2088 **New value:** Add a value, string, or timestamp. When it is a value or a string, data can be read for a fixed value or from a specified address.
2089
2090 **Delete:** Delete the selected field.
2091
2092 **Settings:** Modify the selected field. If the selected fields are components and arrays, only the names can be modified. But components and arrays include values that can modify parameters.
2093
2094 **Template:** Paste the JSON text, and the system will automatically arrange the schema to conform to this JSON format, saving the time of self-definition.
2095
2096 **Preview:** Preview JSON data in an easy-to-read format.
2097
2098 **✎Note: A Topic can be up to 512 nodes (including payload), and a node name can be configured to be up to 255 characters length.**
2099
2100
2101 **Security settings**
2102
2103 The topic is published only when the register status matches the setting. As shown in the following figure, this topic will not be published until the address HDX0.0 is set to ON.
2104
2105 (% style="text-align:center" %)
2106 [[image:35.jpg]]
2107
2108 **MQTT topic subscription**
2109
2110 Select [Topic subscription] and click [Add] to enter general property settings and address settings. The maximum number of MQTT subscription topics is 255.
2111
2112 (% style="text-align:center" %)
2113 [[image:36.jpg]]
2114
2115 **General properties**
2116
2117 (% style="text-align:center" %)
2118 [[image:37.jpg]]
2119
2120 **Alias:** Set the project name of the MQTT theme. Maximum input length: 255 characters, cannot be empty.
2121
2122 **Topic:** Topics subscribed from the MQTT server. Maximum input length: 255 characters, cannot be empty.
2123
2124 **Compression type:** The transport compression type of a subscription topic must be the same as that of a publication topic.
2125
2126 **QoS:** MQTT provides three levels of reliability called service quality. The service quality of message transmission determines whether the message is guaranteed to be delivered.
2127
2128 0: Messages are sent only once, and delivery is not guaranteed.
2129
2130 1: Message must be delivered at least once.
2131
2132 2: Message is delivered just once.
2133
2134 **Content format:**
2135
2136 Raw data: There is no original data in a specific format.
2137
2138 JSON (General): JSON format of single-layer structure.
2139
2140 JSON (Advanced): JSON format of flexibly customizable nested structure.
2141
2142 **Verify timestamp:** The user can decide whether to verify the timestamp or not. When checked, it indicates that the received data timestamp must be strictly incremented before it can be updated. Otherwise, it will be judged as outdated data and not updated.
2143
2144 **Use the top "d" symbol in the message format:**
2145
2146 This function is only supported when the content format uses [JSON (General)]. When checked, the message format is as follows:
2147
2148 {
2149
2150 "d": {
2151
2152 "addressName1": ...,
2153
2154 "addressName2":...
2155
2156 },
2157
2158 "ts":...
2159
2160 }
2161
2162 When unchecked, the message format is as follows:
2163
2164 {
2165
2166 "addressName1": ..., "addressName2":...,
2167
2168 "ts":...
2169
2170 }
2171
2172 Please select the appropriate settings according to the data source.
2173
2174 **Address setting**
2175
2176 ①Address settings when content formats use [Raw Data] and [JSON (General)].
2177
2178 (% style="text-align:center" %)
2179 [[image:38.jpg]]
2180
2181 **Add:** Establish the address where the data is placed after the topic is subscribed, and the length of each address can be set separately.
2182
2183 **Delete:** Delete the address.
2184
2185 **Settings:** Modify the address and name.
2186
2187 (% style="text-align:center" %)
2188 [[image:39.jpg]]
2189
2190 **Remove JSON array brackets' ['and'] ':**
2191
2192 When using non-array bits or characters, array symbol can manually be removed.
2193
2194 **✎Note: A topic can be configured up to 255 nodes. The name length of a node can be configured up to a maximum of 255 characters and cannot be empty.**
2195
2196 ② Address setting when the content format uses [JSON (Advanced)]. [JSON (Advanced)] supports nested structure, which can use components, arrays and other forms. Timestamps and data names can also be customized, which is a more flexible design method.
2197
2198 (% style="text-align:center" %)
2199 [[image:40.jpg]]
2200
2201 **New component:** Add a new data component. There can be multiple data formats in a component, each with a name and a value. The data of the component is included in braces {}.
2202
2203 **New Array:** Add a new data array. Arrays can have multiple data formats, but only one name. The data of the component is included in brackets [].
2204
2205 **New value:** Add a value, string, or timestamp. When it is a value or a string, data can be read for a fixed value or from a specified address.
2206
2207 **Delete:** Delete the selected field.
2208
2209 **Settings:** Modify the selected field. If the selected fields are components and arrays, only the names can be modified. But components and arrays include values that can modify parameters.
2210
2211 **Template:** Paste the JSON text, and the system will automatically arrange the schema to conform to this JSON format, saving the time of self-definition.
2212
2213 **Preview:** Preview JSON data in an easy-to-read format.
2214
2215 **✎Note: A Topic can be up to 512 nodes (including payload), and a node name can be configured to be up to 255 characters length.**
2216
2217
2218 **Security settings**
2219
2220 The topic is published only when the register status matches the setting. As shown in the following figure, this topic will not be published until the address HDX0.0 is set to ON.
2221
2222 (% style="text-align:center" %)
2223 [[image:41.jpg]]
2224
2225 **MQTT Server Settings (Huawei)**
2226
2227 **General**
2228
2229 (% style="text-align:center" %)
2230 [[image:42.jpg]]
2231
2232 **Description:** Enter a description or comment about the server. Maximum input length: 255 characters, cannot be empty.
2233
2234 **Cloud service description**: (Select Huawei)
2235
2236 ① Common (Common Platform): General MQTT publish-subscribe topic mode.
2237
2238 ② AWS IoT (Amazon): Using "AWS IoT" as the Broker, using Thing to transfer data and support Shadow function.
2239
2240 ③ ALi (Alibaba Cloud): Using "Alibaba Cloud" as Broker.
2241
2242 ④ Huawei (Huawei Cloud): Using "Huawei Cloud" as Broker.
2243
2244 **Communication protocol**: MQTTv3.1, v3.1.1 and v5 are supported.
2245
2246 **Domain name:** Set the domain name of the MQTT server that subscribe message. Maximum input length: 128 characters, cannot be empty, supports letters, numbers, "-", “.”. The symbol cannot be placed at the first character or last character of name.
2247
2248 **Port number:** Set the MQTT server port to subscribe message. Range: 0~~65535, cannot be empty.
2249
2250 **DeviceId:** **Device ID** generated when registering the device in Huawei Cloud. Maximum input length: 128 characters
2251
2252 **DeviceSecret:** Customized **password **when registering devices on Huawei Cloud Maximum input length: 128 characters.
2253
2254 **Timestamp:** LOCAL: Using the HMI time as the timestamp. UTC Time: Using UTC+0.
2255
2256 **Clean message cache when normal connected:** If option is enabled, when the device is disconnected, the message to be published will be cached in the cache area, and then will be published when the device is online again.
2257
2258
2259 **Address**
2260
2261 (% style="text-align:center" %)
2262 [[image:43.jpg]]
2263
2264 **Status address: (Total length: 2 words)**
2265
2266 HDWn: Display [MQTT] connection status.
2267
2268 |Value|Description
2269 |0|Disable MQTT server connection
2270 |1|Disconnected or connecting
2271 |2|Successfully connected the MQTT server
2272
2273 HDWn+1: Error prompt
2274
2275 |Value|Description
2276 |0|No error
2277 |-1|General error code of wrong operation
2278 |-3|Disconnected
2279 |-4|Exceed client data concurrency
2280 |-5|Invalid UTF-8 string
2281 |-6|Null pointer parameter
2282 |-7|Topic name is truncated
2283 |-8|Wrong protocol structure body
2284 |-9|Wrong QOS.  (0, 1, 2) is acceptable.
2285 |-10|Attempt to use a non-SSL library for SSL connection
2286 |-11|Wrong MQTT version
2287 |-14|Wrong protocol type
2288 |-15|Option is not suitable for the current request version
2289 |-16|Call MQTT version that is not applicable to request.
2290 |-17|0 length topic connection
2291
2292 **Buffer usage address: (Total length: 1 word)**
2293
2294 Unsuccessful published message will be stored in memory as cache, with a maximum 100,000 messages. Value display as unit %, and it is carried unconditionally.
2295
2296 HDWn: Display buffer usage.
2297
2298 **Control address: (Total length: 194 words)**
2299
2300 HDWn: Control the execution or stop of [MQTT Server].
2301
2302 |Value|Description
2303 |0|Ready
2304 |1|Start
2305 |2|Stop
2306 |3|Update
2307
2308 HDWn+1: Port number of the Huawei Cloud.
2309
2310 HDWn+2: Domain name of the Huawei Cloud.
2311
2312 HDWn+66: DeviceSecret of the Huawei Cloud.
2313
2314 HDWn+130: DeviceSecret of the Huawei Cloud.
2315
2316 **TLS/SSL Settings**
2317
2318 (% style="text-align:center" %)
2319 [[image:44.jpg]]
2320
2321 **Enable:** Enable TLS/SSL encryption. User can manually select encrypted versions of TLS 1.0, TLS 1.1, or TLS 1.2.
2322
2323 **Server authentication:**
2324
2325 Enable: Verify whether the server certificate has been certified by a Certificate Authority Certificate (CA). Server certificates are sent by the server when connection is established.
2326
2327 Import: Select CA certificate to import.
2328
2329 More: After the import is successful, clicking it will display the certificate details.
2330
2331 Reset: Reset the import information.
2332
2333 The server name must match the certificate information: Verify whether the server name or IP matches with the information in the certificate. Domain name and IP are recorded in the Subject Alternative Name from certificate.
2334
2335 **Client authentication:** The private key and client certificate are the data required for the server to authenticate the client end.
2336
2337 Certificate:
2338
2339 Import: Select certificate to import.
2340
2341 More: After the import is successful, clicking it will display the certificate details.
2342
2343 Reset: Reset the import information.
2344
2345 Key:
2346
2347 Import: Select the key to import.
2348
2349 More: After the import is successful, clicking it will display key details.
2350
2351 Reset: Reset the import information.
2352
2353 **MQTT Topic**
2354
2355 **MQTT topic publish**
2356
2357 Select [Topic publish], click [Add], enter [Add MQTT topic publish object], and set the general settings and address. The maximum number of MQTT published topics is 255.
2358
2359 (% style="text-align:center" %)
2360 [[image:45.jpg]]
2361
2362 **General properties**
2363
2364 (% style="text-align:center" %)
2365 [[image:46.jpg]]
2366
2367 **Alias:** Set the project name of the MQTT theme. Maximum input length: 255 characters, cannot be empty.
2368
2369 **Topic:** The topic received by the MQTT server when sending message. Maximum input length: 255 characters, cannot be empty.
2370
2371 **Sending mode:** **(AUTO/TRIGGER)**
2372
2373 **① AUTO **value change mode: When any value changes, MQTT message is published.
2374
2375 a. Minimum time interval between messages: The minimum time interval can be set between messages to avoid over-publishing MQTT messages. When the interval of value change is less than the minimum time interval between messages, the message will be put in the cache. The MQTT message will not be published until the minimum interval between messages is met. Range: 0~~3600000ms.
2376
2377 b. Periodic mode: Publish MQTT message by the fixed time. Time interval: Set the time interval for periodic publishing, ranging from 1 to 3600s.
2378
2379 **② TRIGGER**
2380
2381 When the specified bit is triggered, the MQTT message is published. When HDX0.0 changes from OFF to ON, an MQTT message is published, and HDX0.0 is automatically set to OFF after publishing.
2382
2383 **Compression type:** Message is compressed before it is transmitted. The compressed message needs to be decompressed before the MQTT client reads it. Zlib, Gzip, or Deflate algorithm can be chosen to compress or decompress the message.
2384
2385 **QoS:** MQTT provides three levels of reliability called service quality. The service quality of message transmission determines whether the message is guaranteed to be delivered.
2386
2387 0: Messages are sent only once, and delivery is not guaranteed.
2388
2389 1: Message must be delivered at least once.
2390
2391 2: Message is delivered just once.
2392
2393 **Retain message:** When checked, the MQTT server will keep the latest message.
2394
2395 **Content format:**
2396
2397 Raw data: Data composed of BYTE data.
2398
2399 JSON (General): Put all data in JSON format of member "d".
2400
2401 JSON (Advanced): JSON format of flexibly customizable nested structure.
2402
2403 **Include timestamps:** This function is only supported when the content format uses [JSON (General)], and whether to include the timestamp can be decided manually.
2404
2405 **Use the top "d" symbol in the message format:**
2406
2407 This function is only supported when the content format uses [JSON (General)]. When checked, the message format is as follows:
2408
2409 {
2410
2411 "d": {
2412
2413 "addressName1": ...,
2414
2415 "addressName2":...
2416
2417 },
2418
2419 "ts":...
2420
2421 }
2422
2423 When unchecked, the message format is as follows:
2424
2425 {
2426
2427 "addressName1": ...,
2428
2429 "addressName2":...,
2430
2431 "ts":...
2432
2433 }
2434
2435 As shown above, when unchecked, ts and address names are both key at the same level. Therefore, avoid taking the address name as ts.
2436
2437
2438 **Address setting**
2439
2440 ①Address settings when content formats use [Raw Data] and [JSON (General)].
2441
2442 (% style="text-align:center" %)
2443 [[image:47.jpg]]
2444
2445 **Add:** Establish the address source of the topic. The length of each address can be set separately.
2446
2447 **Delete:** Delete the address.
2448
2449 **Settings:** Modify the address and name.
2450
2451 (% style="text-align:center" %)
2452 [[image:48.jpg]]
2453
2454 **Included in all message sent**
2455
2456 Check the options: This topic will include this address every time it publishes a message.
2457
2458 Uncheck the options: When the sending mode is value, message is published only when the value of the address changes.
2459
2460 **Remove JSON array brackets' ['and'] ':**
2461
2462 Check the options: Remove the array symbol name when using non-array bits or characters.
2463
2464 **✎Note: A topic can be configured up to 255 nodes. The name length of a node can be configured up to a maximum of 255 characters and cannot be empty.**
2465
2466 ② Address setting when the content format uses [JSON (Advanced)]. [JSON (Advanced)] supports nested structure, which can use components, arrays and other forms. Timestamps and data names can also be customized, which is a more flexible design method.
2467
2468 (% style="text-align:center" %)
2469 [[image:49.jpg]]
2470
2471 The above figure is an example. If setting like above figure, the subscription side will receive the MQTT message like following format.
2472
2473 {
2474 "object": {
2475 "value": "teststring",
2476 "value (1)": 123,
2477 "value (2)": true,
2478 "value (3)": "",
2479 "value (4)": 0,
2480 "value (5)": true
2481 },
2482 "array": [
2483 10,
2484 20,
2485 30
2486 ],
2487 "value (6)": " 2023-04-27T03: 53: 20.156271 "
2488 }
2489
2490 **New component:** Add a new data component. Components can have multiple data formats; each data format has its own Name and Value. The data of the component is included in braces {}.
2491
2492 **New value:** Add a value, string, or timestamp. When it is a value or a string, data can be read for a fixed value or from a specified address.
2493
2494 **Delete:** Delete the selected field.
2495
2496 **Settings:** Modify the selected field. If the selected fields are components and arrays, only the names can be modified. But components and arrays include values that can modify parameters.
2497
2498 **Template:** Paste the JSON text, and the system will automatically arrange the schema to conform to this JSON format, saving the time of self-definition.
2499
2500 **Preview:** Preview JSON data in an easy-to-read format.
2501
2502 **✎Note: A Topic can be up to 512 nodes (including payload), and a node name can be configured to be up to 255 characters length.**
2503
2504
2505 **Security settings**
2506
2507 The topic is published only when the register status matches the setting. As shown in the following figure, this topic will not be published until the address HDX0.0 is set to ON.
2508
2509 (% style="text-align:center" %)
2510 [[image:50.jpg]]
2511
2512
2513 **MQTT topic subscription**
2514
2515 Select [Topic subscription] and click [Add] to enter general property settings and address settings. The maximum number of MQTT subscription topics is 255.
2516
2517 (% style="text-align:center" %)
2518 [[image:51.jpg]]
2519
2520 **General properties**
2521
2522 (% style="text-align:center" %)
2523 [[image:52.jpg]]
2524
2525 **Alias:** Set the project name of the MQTT theme. Maximum input length: 255 characters, cannot be empty.
2526
2527 **Topic:** Topics subscribed from the MQTT server. Maximum input length: 255 characters, cannot be empty.
2528
2529 **Compression type:** The transport compression type of a subscription topic must be the same as that of a publication topic.
2530
2531 **QoS:** MQTT provides three levels of reliability called service quality. The service quality of message transmission determines whether the message is guaranteed to be delivered.
2532
2533 0: Messages are sent only once, and delivery is not guaranteed.
2534
2535 1: Message must be delivered at least once.
2536
2537 2: Message is delivered just once.
2538
2539 **Content format:**
2540
2541 Raw data: There is no original data in a specific format.
2542
2543 JSON (General): JSON format of single-layer structure.
2544
2545 JSON (Advanced): JSON format of flexibly customizable nested structure.
2546
2547 **Verify timestamp:** The user can decide whether to verify the timestamp or not. When checked, it indicates that the received data timestamp must be strictly incremented before it can be updated. Otherwise, it will be judged as outdated data and not updated.
2548
2549 **Use the top "d" symbol in the message format:**
2550
2551 This function is only supported when the content format uses [JSON (General)]. When checked, the message format is as follows:
2552
2553 {
2554
2555 "d": {
2556
2557 "addressName1": ...,
2558
2559 "addressName2":...
2560
2561 },
2562
2563 "ts":...
2564
2565 }
2566
2567 When unchecked, the message format is as follows:
2568
2569 {
2570
2571 "addressName1": ..., "addressName2":...,
2572
2573 "ts":...
2574
2575 }
2576
2577 Please select the appropriate settings according to the data source.
2578
2579 **Address setting**
2580
2581 ①Address settings when content formats use [Raw Data] and [JSON (General)].
2582
2583 (% style="text-align:center" %)
2584 [[image:53.jpg]]
2585
2586 **Add:** Establish the address where the data is placed after the topic is subscribed. The length of each address can be set separately.
2587
2588 **Delete:** Delete the address.
2589
2590 **Settings:** Modify the address and name.
2591
2592 (% style="text-align:center" %)
2593 [[image:54.jpg]]
2594
2595 **Remove JSON array brackets' ['and'] ':**
2596
2597 When using non-array bits or characters, array symbol can manually be removed.
2598
2599 **✎Note: A topic can be configured up to 255 nodes. The name length of a node can be configured up to a maximum of 255 characters and cannot be empty.**
2600
2601 ② Address setting when the content format uses [JSON (Advanced)]. [JSON (Advanced)] supports nested structure, which can use components, arrays and other forms. Timestamps and data names can also be customized, which is a more flexible design method.
2602
2603 (% style="text-align:center" %)
2604 [[image:HMIEditor_Db5tLtioq7.jpg]]
2605
2606 **New component:** Add a new data component. There can be multiple data formats in a component, each with a name and a value. The data of the component is included in braces {}.
2607
2608 **New Array:** Add a new data array. Arrays can have multiple data formats, but only one name. The data of the component is included in brackets [].
2609
2610 **New value:** Add a value, string, or timestamp. When it is a value or a string, data can be read for a fixed value or from a specified address.
2611
2612 **Delete:** Delete the selected field.
2613
2614 **Settings:** Modify the selected field. If the selected fields are components and arrays, only the names can be modified. But components and arrays include values that can modify parameters.
2615
2616 **Template:** Paste the JSON text, and the system will automatically arrange the schema to conform to this JSON format, saving the time of self-definition.
2617
2618 **Preview:** Preview JSON data in an easy-to-read format.
2619
2620 **✎Note: A Topic can be up to 512 nodes (including payload), and a node name can be configured to be up to 255 characters length.**
2621
2622
2623 **Security settings**
2624
2625 The topic is published only when the register status matches the setting. As shown in the following figure, this topic will not be published until the address HDX0.0 is set to ON.
2626
2627 (% style="text-align:center" %)
2628 [[image:56.jpg]]