Wiki source code of 06 Data Tool

Version 47.1 by Mora Zhou on 2023/10/27 16:39

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