Wiki source code of 3.2 Basic information
Last modified by Wecon on 2025/09/03 21:04
Show last authors
author | version | line-number | content |
---|---|---|---|
1 | = **Basic information** = | ||
2 | |||
3 | (% class="wikigeneratedid" id="HBasicinformation" %) | ||
4 | After adding a v-box or ig HMI, click the device list on the left to select v-box or ig HMI, and it will automatically jump to the device detail interface with seven subpages. The subpages include **Real-time Data, Alarm, Historical data, Cloud SCADA, Pass-through, and C onfiguration**. | ||
5 | |||
6 | Users can modify the information with valid data, and click the "save" button to finish the modification successfully. As shown in the following figure. | ||
7 | |||
8 | (% style="text-align:center" %) | ||
9 | [[image:基本配置.png]] | ||
10 | |||
11 | = **Configuration** = | ||
12 | |||
13 | Select "Basic Information", you can see the name of VBOX, online status and some other functions. You can locate the VBOX on the map to know where the VBOX is located. | ||
14 | At the bottom of the basic information, you can Unlink VBOX, restart VBOX, force sync, import and export VBOX configuration. Forced sync is to sync the data directly from cloud service to PC. Import/Export VBOX Configuration, you can export and import the configuration data of existing VBOX to other VBOX, or import the configuration of other VBOX to the existing VBOX. | ||
15 | |||
16 | (% style="text-align:center" %) | ||
17 | [[image:盒子的基础信息.png]] | ||
18 | |||
19 | |||
20 | **Unbind the device** | ||
21 | |||
22 | The administrator can click "Unlink device" to unbind the v-box or ig screen on the "Basic Information" sub-page under the "Basic Configuration" page. If the configuration of the communication port and monitoring point corresponding to the device is not deleted after unbinding, then the next time the device is added, the data is still exist and automatically transferred to the device. As shown in the following figure. | ||
23 | |||
24 | **Copy configuration** | ||
25 | |||
26 | Copy configuration is to copy the device configuration from one v-box to another v-box. If the configurations of multiple devices are the same or alike, the user can configure the information of one v-box first, and copy the configuration to another v-box through the [Copy Configuration] function. The configuration can only be copied if there is a v-box of the same model in the account. As shown in the following figure. | ||
27 | |||
28 | (% style="text-align:center" %) | ||
29 | [[image:基础配置:复制.png]] | ||
30 | |||
31 | If the configuration is copied successfully, the following figure will be prompted. | ||
32 | |||
33 | (% style="text-align:center" %) | ||
34 | [[image:4-6.png]] | ||
35 | |||
36 | (% class="box infomessage" %) | ||
37 | ((( | ||
38 | **✎Note: **Only when the configuration information of the "Water Treatment System" of the v-box is empty can the configuration information be copied successfully. If other parameters are configured in the "water treatment system" of v-box, and a copy failure message will be prompted as below. | ||
39 | ))) | ||
40 | |||
41 | (% style="text-align:center" %) | ||
42 | [[image:4-7.png]] | ||
43 | |||
44 | (% class="wikigeneratedid" %) | ||
45 | **Export/Import** | ||
46 | |||
47 | (% class="box infomessage" %) | ||
48 | ((( | ||
49 | **✎Note:** The exported files can only be imported into V-BOX of the same series | ||
50 | ))) | ||
51 | |||
52 | (% style="text-align:center" %) | ||
53 | [[image:导出配置.png]] | ||
54 | |||
55 | (% style="text-align:center" %) | ||
56 | [[image:导出配置.png]] | ||
57 | |||
58 | == **Communication ** == | ||
59 | |||
60 | Users can add, modify and delete communication configuration in **"Configuration"->"Communication", **but only the administrator account has permissions to operate this function. | ||
61 | |||
62 | (% style="text-align:center" %) | ||
63 | [[image:通讯.png]] | ||
64 | |||
65 | **Add communication port configuration** | ||
66 | |||
67 | Click the Add button [[image:https://docs.we-con.com.cn/bin/download/V-BOX/V-Net/Manual/01%20V-NET%20Platform/04%20Access%20Configuration/WebHome/4-8%202.png?rev=1.1||alt="4-8 2.png"]] to configure the communication port information. If the configuration are configured successfully, the system will synchronize the configuration information and drive files to the v-box. | ||
68 | |||
69 | (% style="text-align:center" %) | ||
70 | [[image:通讯配置.png]] | ||
71 | |||
72 | **Modify and Delete** | ||
73 | |||
74 | The administrator can click the button [[image:https://docs.we-con.com.cn/bin/download/V-BOX/V-Net/Manual/01%20V-NET%20Platform/04%20Access%20Configuration/WebHome/4-8%203.png?width=36&height=29&rev=1.1||alt="4-8 3.png" height="29" width="36"]] to modify the data of the v-box except for the machine code. If the drive file changes, the monitoring point and data of the communication port will be deleted synchronously. | ||
75 | |||
76 | Click the button [[image:https://docs.we-con.com.cn/bin/download/V-BOX/V-Net/Manual/01%20V-NET%20Platform/04%20Access%20Configuration/WebHome/4-8%204.png?width=40&height=36&rev=1.1||alt="4-8 4.png" height="36" width="40"]]to delete the communication port configuration, the monitoring point data associated with the communication port configuration under the v-box will also be deleted, and a dialog box will pop up to confirm whether the operation continues. | ||
77 | |||
78 | == **Network** == | ||
79 | |||
80 | Users can view the network configuration of V-BOX and update and change it. | ||
81 | |||
82 | (% style="text-align:center" %) | ||
83 | [[image:network.png]] | ||
84 | |||
85 | == **Status push(Email)** == | ||
86 | |||
87 | Status push is to push the data set by the v-box to the mailbox. | ||
88 | |||
89 | (% style="text-align:center" %) | ||
90 | [[image:状态推送.png]] | ||
91 | |||
92 | **Email notification. **Set the email push information in Service~-~-Email. | ||
93 | |||
94 | **Add recipient. **Add the recipient name, email address, and enable the email permission. | ||
95 | |||
96 | == **Tags usage** == | ||
97 | |||
98 | It records the current use and a maximum number of data monitoring points of data monitoring, historical records, and alarm records of the current v-box. | ||
99 | |||
100 | (% style="text-align:center" %) | ||
101 | [[image:数据限制.png]] | ||
102 | |||
103 | == **Registers information** == | ||
104 | |||
105 | It records the V-box information, such as IP address, WIFI. | ||
106 | |||
107 | (% style="text-align:center" %) | ||
108 | [[image:寄存器信息.png]] | ||
109 | |||
110 | == **Device version** == | ||
111 | |||
112 | As the product is constantly updated, the functions of thev-box can be judged based on the version information. | ||
113 | |||
114 | (% style="text-align:center" %) | ||
115 | [[image:固件版本.png]] | ||
116 | |||
117 | = **Real-time data** = | ||
118 | |||
119 | In the "Real-time Data" interface, users can configure real-time monitoring points to easily obtain equipment data, and operate online. To add a real-time monitoring point, users need to select a group or enter the real-time monitoring point name, the connected device (ie, communication port), address type, register type, and other data. | ||
120 | |||
121 | (% style="text-align:center" %) | ||
122 | [[image:创建监控点.png]] | ||
123 | |||
124 | **Add and delete in batch** | ||
125 | |||
126 | Before batch deletion, select the monitoring points to be deleted, and then select batch deletion. For batch add, you need to set the batch number and increment. The increment is to fill in the address interval settings in those addresses added in batch. | ||
127 | |||
128 | (% style="text-align:center" %) | ||
129 | [[image:批量_增添监控点.png]] | ||
130 | |||
131 | **Import and export** | ||
132 | |||
133 | (% style="text-align:center" %) | ||
134 | [[image:导入导出1.png]] | ||
135 | |||
136 | **group management** | ||
137 | |||
138 | Real-time monitoring points can be grouped and managed, and monitoring points can be moved to different groups. Users can click the **“Group Settings” **to** **add, modify, and delete groups. | ||
139 | |||
140 | (% style="text-align:center" %) | ||
141 | [[image:监控点群组管理.png]] | ||
142 | |||
143 | **Real-time data modification** | ||
144 | |||
145 | Users can modify the real-time data of the monitoring point. Click the data of one monitoring point to edit, and click [[image:https://docs.we-con.com.cn/bin/download/V-BOX/V-Net/Manual/01%20V-NET%20Platform/04%20Access%20Configuration/WebHome/4.28%201.png?width=24&height=24&rev=1.1||alt="4.28 1.png" height="24" width="24"]],the monitoring point real-time data will be modified to the data entered. Click [[image:https://docs.we-con.com.cn/bin/download/V-BOX/V-Net/Manual/01%20V-NET%20Platform/04%20Access%20Configuration/WebHome/4.28%202.png?width=24&height=24&rev=1.1||alt="4.28 2.png" height="24" width="24"]] to cancel the modification. | ||
146 | |||
147 | (% style="text-align:center" %) | ||
148 | [[image:监控点数据修改.png]] | ||
149 | |||
150 | == **Address Mapping** == | ||
151 | |||
152 | **Required hardware and software configurations** | ||
153 | |||
154 | * two V-BOXs | ||
155 | * two PLCs | ||
156 | * a V-NET account | ||
157 | |||
158 | **System network topology** | ||
159 | |||
160 | {{diagram reference="System network topology" cached="false"/}} | ||
161 | |||
162 | |(% colspan="2" rowspan="1" %)PLC 1|(% rowspan="3" %)((( | ||
163 | **⇔** | ||
164 | )))|(% colspan="2" rowspan="1" %)PLC 2 | ||
165 | |D500|source data 1|D500|target data 1 | ||
166 | |D502|target data 2|D502|source data 2 | ||
167 | |||
168 | V-BOX 1 | ||
169 | |||
170 | * Add monitoring point D500 as "source data 1", and select the monitoring point D500 (target data 1) of V-BOX 2 in the map, as shown in the following figure. | ||
171 | * Add monitoring point D502 as "source data 2". | ||
172 | |||
173 | (% style="text-align:center" %) | ||
174 | [[image:地址映射1.jpeg]] | ||
175 | |||
176 | V-BOX 2 | ||
177 | |||
178 | * Add monitoring point D500 as "source data 1". | ||
179 | * Add monitoring point D502 as "source data 2", and select the monitoring point D500 (target data 1) of V-BOX 2 in the map, as shown in the following figure. | ||
180 | |||
181 | (% style="text-align:center" %) | ||
182 | [[image:地址映射2.jpeg]] | ||
183 | |||
184 | The configuration data will be automatically sent to V-BOX when it is online. Source data 1 of address D500 in PLC1 will be mapped to the target data 1 of address D500 in PLC2, and the source data 2 of address D502 in PLC2 will be mapped to the target data 2 of address D502 in PLC1. | ||
185 | |||
186 | |(% colspan="2" rowspan="1" %)V-BOX1 + PLC 1|(% rowspan="3" %)((( | ||
187 | **⇔** | ||
188 | )))|(% colspan="2" rowspan="1" %)V-BOX 2 + PLC 2 | ||
189 | |D500|source data 1|D500|target data 1 | ||
190 | |D502|target data 2|D502|source data 2 | ||
191 | |||
192 | There is a video for mapping. | ||
193 | |||
194 | [[Mapping video>>https://ftp.we-con.com.cn/Download/WIKI/V-BOX/Video/Mapping-V%20box.mp4]] | ||
195 | |||
196 | = **Alarm** = | ||
197 | |||
198 | Users can configure the alarms, and view the current alarms and historical alarms. Alarms can be divided into current alarm and historical alarm according to the administrator's confirmation. | ||
199 | |||
200 | **Current alarm** | ||
201 | |||
202 | The alarm data in the "current alarm" sub-page are all the records that have not yet been "confirmed". The administrator can "confirm" the current alarm data to change its state. The alarm data can be queried according to the code, name, start and end date, and other conditions. | ||
203 | |||
204 | (% style="text-align:center" %) | ||
205 | [[image:报警1.1.png]] | ||
206 | |||
207 | **Alarm tags** | ||
208 | |||
209 | In the sub-page of "Alarm Registration" under "Alarm Record", users can add a new alarm. When adding an alarm record, users need to select or enter data such as name, group, the connected device (ie communication port), address type, etc. | ||
210 | |||
211 | (% style="text-align:center" %) | ||
212 | [[image:报警2 2.png]] | ||
213 | |||
214 | **Historical alarm** | ||
215 | |||
216 | The alarm data after the "confirm" operation is the historical alarm data and will be transferred to the "historical alarm" sub-page. The data can be queried according to the code, name, start and end date, and other conditions. | ||
217 | |||
218 | (% style="text-align:center" %) | ||
219 | [[image:历史报警.png]] | ||
220 | |||
221 | = **Historical data** = | ||
222 | |||
223 | Users can add the address to be monitored, collect data according to conditions, and form data tables, which can be used for query and storage. | ||
224 | |||
225 | **Historical Data Group Setting** | ||
226 | |||
227 | When adding data points, you need to first create the group in the Grouping Settings. | ||
228 | |||
229 | (% style="text-align:center" %) | ||
230 | [[image:历史群组创建1.png]] | ||
231 | |||
232 | In the new group, you can create the group name, select the trigger type, and set the sampling period. Trigger types are: no trigger, trigger to record by cycle, trigger to record once and reset, trigger to record once. | ||
233 | |||
234 | (% style="text-align:center" %) | ||
235 | [[image:群组创建条件.png]] | ||
236 | |||
237 | **Historical tags** | ||
238 | |||
239 | On the "**Historical tags"** sub-page of **"Historical Data"**, Users can configure historical data, including name, the connection device (communication port), address type, and register type, etc. | ||
240 | |||
241 | (% style="text-align:center" %) | ||
242 | [[image:创建历史监控点.png]] | ||
243 | |||
244 | **Data query** | ||
245 | |||
246 | On the "**Data"** sub-page of **"Historical Data"**, Users can query and delete historical data. including name, the connection device (communication port), address type, and register type, etc., When querying data, users need to select or enter the monitoring point and start and end dates. The display of historical data can be viewed in both tables and curves. | ||
247 | |||
248 | (% style="text-align:center" %) | ||
249 | [[image:历史数据查询.png]] | ||
250 | |||
251 | = **Cloud SCADA** = | ||
252 | |||
253 | **Cloud SCADA **is to monitor remote configuration interface. | ||
254 | |||
255 | (% style="text-align:center" %) | ||
256 | [[image:scada1.png]] | ||
257 | |||
258 | One v-box can be bound to at most one cloud SCADA project. | ||
259 | |||
260 | * If the v-box is not bound to a cloud SCADA project, it will prompt "you have not bound the Web SCADA project for Device, please bind it!". | ||
261 | * If the bound project has been deleted, it will prompt "The project you bound has been deleted or you have no permission to view it! Please rebind.". Shown as below. | ||
262 | |||
263 | (% style="text-align:center" %) | ||
264 | [[image:4-35.png]] | ||
265 | |||
266 | V-box will preference to use the cloud SCADA project in the template. If a cloud SCADA project template has been bound to the v-box, it cannot bind or modify the cloud SACDA project of the v-box separately. | ||
267 | |||
268 | If the v-box is not bound to a template, the v-box can choose to bind the cloud SCADA project specified in the cloud SCADA platform. The cloud SCADA project across the v-box is not optional. | ||
269 | |||
270 | The v-box uses The template cloud SCADA project to design on the cloud SCADA platform, But bthe browsing and viewing access are in the V-NET. The projects can not be browsed and viewed in the cloud SCADA platform. | ||
271 | |||
272 | If the template project is modified, Cloud SCADA of all v-boxes using this template will update synchronously. | ||
273 | |||
274 | = **LUA script** = | ||
275 | |||
276 | == **Lua script management** == | ||
277 | |||
278 | Click **"LUA script" **to jump to the **LUA script management module** of v-box. The module has the functions including a script list, new script, edit script, delete scripts in batch, sync scripts, sync scripts in batch, import scripts, export scripts, debug, view box scripts, etc. | ||
279 | |||
280 | (% style="text-align:center" %) | ||
281 | [[image:4-37.png||class="img-thumbnail"]] | ||
282 | |||
283 | **New script** | ||
284 | |||
285 | **Create a new script** | ||
286 | |||
287 | Click the button [[image:4.6.1 1.png]] to fill in the name and execution, then click "save and next" to create a new script. | ||
288 | |||
289 | (% style="text-align:center" %) | ||
290 | [[image:4-38.png||class="img-thumbnail"]] | ||
291 | |||
292 | * **Name. T**he name of the script must start with [a-z, A-Z] and a maximum of 32 characters are allowed. | ||
293 | * **Execution. **There are four script execution conditions as the following. | ||
294 | |||
295 | |=Execution condition|=Function|=Number | ||
296 | |initialization|Execute only once after power on.|Maximum one | ||
297 | |Execution if connected|Execute after the v-box is connected to the server.|Maximum one | ||
298 | |Execution if Disconnected|Execute when the box is disconnected from the server.|Maximum one | ||
299 | |Timing|((( | ||
300 | Executed cyclically according to the set timing time | ||
301 | )))|Maximum five | ||
302 | |||
303 | * **Timing. **If the user selects "Timing" as execution condition, the time and the time unit need to be entered. | ||
304 | |||
305 | (% style="text-align:center" %) | ||
306 | [[image:4-38 1.png||class="img-thumbnail"]] | ||
307 | |||
308 | (% class="box infomessage" %) | ||
309 | ((( | ||
310 | **✎Note: **The script** **can not be modified after it is created except for the timing. | ||
311 | ))) | ||
312 | |||
313 | **Edit script** | ||
314 | |||
315 | * Click** **[[image:编辑.png]]to jump to the LUA script edit interface and the script editor will display the initialization code. | ||
316 | |||
317 | (% style="text-align:center" %) | ||
318 | [[image:4-39 2.png||class="img-thumbnail"]] | ||
319 | |||
320 | * The LUA script written by the user will be written in the initialized function structure, and the structure is not allowed to be modified | ||
321 | |||
322 | **Script list** | ||
323 | |||
324 | The added script is displayed in the script list. A Row represents a script. | ||
325 | |||
326 | (% style="text-align:center" %) | ||
327 | [[image:4-40.png||class="img-thumbnail"]] | ||
328 | |||
329 | The following table describes the parameters in the script list. | ||
330 | |||
331 | |=Parameter|=Instruction | ||
332 | |Status|The two status of script, including sync and not synced | ||
333 | |Name|Script name | ||
334 | |Execution|Script execution condition | ||
335 | |Enable|Script enablement switch. | ||
336 | |Sync|ON is to enable the script, and OFF is to disable the script. When the v-box is offline or penetrating, the button is grayed out and cannot be operated. | ||
337 | |Scripts|View the scripts that are already running on the v-box. | ||
338 | |Operation|Edit or delete the script. | ||
339 | |||
340 | **Delete script ** | ||
341 | |||
342 | Edit the button to [[image:删除.png]]delete the script. Select multiple scripts, click the button [[image:4.6.1 3.png]] to delete in batch. | ||
343 | |||
344 | (% style="text-align:center" %) | ||
345 | [[image:4-41.png||class="img-thumbnail"]] | ||
346 | |||
347 | **Sync in batch** | ||
348 | |||
349 | Select the scripts in the list, click the button [[image:4.6.1 4.png]] to sync in batch. The failed sync information will display after the sync button in the script list. | ||
350 | |||
351 | (% style="text-align:center" %) | ||
352 | [[image:4-41 1.png||class="img-thumbnail"]] | ||
353 | |||
354 | (% style="text-align:center" %) | ||
355 | [[image:4-41 2.png||class="img-thumbnail"]] | ||
356 | |||
357 | **~ Import and export script** | ||
358 | |||
359 | 1. **Export script. **Click the button [[image:4.6.1 5.png]], all the scripts of the v-box can be exported as a file with a **.script** extension. | ||
360 | 1. **Import script. **Click the button** **[[image:4.6.1 6.png]], the file with a **script** extension can be imported to the v-box. After the script is imported, the script in the current v-box is cleared. | ||
361 | |||
362 | (% class="box infomessage" %) | ||
363 | ((( | ||
364 | **✎Note: ** | ||
365 | |||
366 | 1. Replacing the communication port will replace the original communication port in the script with the communication port of the current v-box. | ||
367 | 1. If the communication port of the current v-box is empty, it will prompt: there is no communication port configuration in the script, no need to replace it. | ||
368 | 1. If the communication port in the imported script file is empty, it will prompt: there is no communication port configuration in the script, no need to replace it. | ||
369 | ))) | ||
370 | |||
371 | **Debug** | ||
372 | |||
373 | Click the button [[image:4.6.1 2.png]] to jump to the script debug interface. Shown as below. | ||
374 | |||
375 | (% style="text-align:center" %) | ||
376 | [[image:4-43.png||class="img-thumbnail"]] | ||
377 | |||
378 | == **Script editor** == | ||
379 | |||
380 | The script editor is an online editor to write Lua scripts. When creating new scripts and modifying scripts, users can switch to the script editor page to write the Lua script of the v-box script. | ||
381 | |||
382 | (% style="text-align:center" %) | ||
383 | [[image:4-45.png]] | ||
384 | |||
385 | **Monitoring points list** | ||
386 | |||
387 | 1. The area displays all the monitoring points of the current v-box with a function of search monitoring points. | ||
388 | 1. Click the line of the monitoring point, and the monitoring point will be inserted at the current cursor of the script editor. The inserted monitoring point will be added with the symbol **"@"** in front of the monitoring point name in the editor and defined as a string. For example, "**@City A temperature**", the monitoring point variable will check grammar following the grammatical rules of the string. After the script is synchronized, the monitoring point variable will be converted to an address on the server-side and sent to the v-box side for use. | ||
389 | |||
390 | (% class="box infomessage" %) | ||
391 | ((( | ||
392 | **✎Note: ** | ||
393 | |||
394 | 1. The address format of the monitoring points are converted to is "**@ address type _ serial number # station number: register type major number. sub number**". If the station number is empty, then remove it. If the sub number is empty, then remove it. | ||
395 | 1. When the mouse passes over the row where the monitoring point is located, more detailed monitoring point information will be displayed through the floating box, and clicking the floating box can also display it to the cursor of the script editor | ||
396 | |||
397 | |||
398 | ))) | ||
399 | |||
400 | **Toolbar** | ||
401 | |||
402 | The toolbar is at the top of the script editor. | ||
403 | |||
404 | (% style="text-align:center" %) | ||
405 | [[image:4-46.png]] | ||
406 | |||
407 | |||
408 | From left to right, the functions are as below | ||
409 | |||
410 | 1. **Save codes. **Save the current codes, with the small red dot next to it indicating that the code was modified but not saved. | ||
411 | 1. **Clear codes.** Clear the current codes in the script editor, and restore them to the initialization structure. | ||
412 | 1. **Insert new address. **Inserts a new bit or word address at the current cursor. | ||
413 | 1. **Copy codes. **The shortcut keys are "**ctrl+c**". For some browsers with earlier versions (IE8 and below), it may not be able to copy content for use outside of this editor. It is advised to use "**ctrl+c**". | ||
414 | 1. **Paste codes.** The shortcut keys are "**ctrl+v**". This button is limited to pasting text copied from the current editor except using Internet Explorer. t is advised to use "**ctrl+v**". | ||
415 | 1. **Cancel. **Cancel the actions in the editor at each step. | ||
416 | 1. **Restore. **Restore the actions in the editor at each step. | ||
417 | 1. **Comment. **Comment or uncomment the code in the current line or the selected line. | ||
418 | 1. **Help. **Jump to help document of script editor, and it is a simple introduction to Lua script editing. | ||
419 | |||
420 | **Code editing area** | ||
421 | |||
422 | The Lua script editor provides Lua scripts for users to write scripts and can perform syntax verification, keyword prompts, common code snippet prompts, variable prompts, code completion, etc. At the same time, it provides monitoring point management functions, which can be directly Insert the address as a variable in the code. | ||
423 | |||
424 | * **syntax check** | ||
425 | |||
426 | (% style="text-align:center" %) | ||
427 | [[image:4-47 1.png]] | ||
428 | |||
429 | Users can check the validity of the syntax in real-time when writing Lua code. As shown in the figure above, there will be an icon [[image:4-47 2.png]]next to the line number of the syntax error line, and the error message will be prompted after the mouse placing. When multiple lines have errors, it will be displayed on the first line of the error. After solving the error in this line, it will be displayed on the next line of the error line. | ||
430 | |||
431 | The syntax check includes the following contents. | ||
432 | |||
433 | 1. Check the spelling of keywords. | ||
434 | 1. Check the definition of variables. | ||
435 | 1. Check the usage specifications of operators. | ||
436 | 1. Check the syntax of the function structure. | ||
437 | |||
438 | (% class="box infomessage" %) | ||
439 | ((( | ||
440 | **✎Note: **The syntax check above does not include running error checking. Running error checking is an error message that is sent to the box, compiled through the v-box, and returned. | ||
441 | ))) | ||
442 | |||
443 | * **Script prompts** | ||
444 | |||
445 | When writing code, the script editor provides hints for fuzzy matching keywords, defined variables, code snippets, etc. Click the corresponding prompt line to complete the codes. | ||
446 | |||
447 | (% style="text-align:center" %) | ||
448 | [[image:4-48.png]] | ||
449 | |||
450 | |||
451 | The provided prompt codes and complete codes include the following categories: | ||
452 | |||
453 | 1. Keywords. Lua language keywords, built-in method names, built-in constants, library functions. | ||
454 | 1. Code snippet. commonly used code snippets in Lua language. | ||
455 | 1. Defined variables (local), the names of all the defined variables. | ||
456 | |||
457 | |=Name|=Sample code|=Name | ||
458 | |(% rowspan="5" %)((( | ||
459 | Code snippet | ||
460 | |||
461 | |||
462 | )))|local x = 1|Variable definition | ||
463 | |((( | ||
464 | function fname(...) | ||
465 | |||
466 | ~-~- body | ||
467 | |||
468 | end | ||
469 | )))|Function structure | ||
470 | |((( | ||
471 | for i=1,10 do | ||
472 | |||
473 | print(i) | ||
474 | |||
475 | end | ||
476 | )))|for loop structure | ||
477 | |((( | ||
478 | while (condition) | ||
479 | |||
480 | do | ||
481 | |||
482 | ~-~- body | ||
483 | |||
484 | end | ||
485 | )))|while loop structure | ||
486 | |((( | ||
487 | if (condition) | ||
488 | |||
489 | then | ||
490 | |||
491 | ~-~- body | ||
492 | |||
493 | end | ||
494 | )))|Conditional structure | ||
495 | |Method name|((( | ||
496 | _G|_VERSION|assert|collectgarbage|dofile|error|getmetatable|ipairs|" + | ||
497 | |||
498 | "load|loadfile|next|pairs|pcall|print|rawequal|" + | ||
499 | |||
500 | "rawget|rawlen|rawset|require|select|setmetatable|" + | ||
501 | |||
502 | "tonumber|tostring|type|xpcall|create|isyieldable|resume|running|" + | ||
503 | |||
504 | "status|wrap|yield|debug|gethook|getinfo|getlocal|" + | ||
505 | |||
506 | "getmetatable|getregistry|getupvalue|" + | ||
507 | |||
508 | "getuservalue|sethook|setlocal|setmetatable|setupvalue|setuservalue|traceback|upvalueid|upvaluejoin|" + | ||
509 | |||
510 | "abs|acos|asin|atan|ceil|cos|deg|exp|" + | ||
511 | |||
512 | "floor|fmod|huge|log|max| maxinteger|min|mininteger|" + | ||
513 | |||
514 | "modf|pi|rad|random|randomseed|sin|sqrt|tan|" + | ||
515 | |||
516 | "tointeger|type|ult|clock|date|difftime|time|config|cpath|" + | ||
517 | |||
518 | "loaded|loadlib|path|preload|searchers|searchpath|byte|char|dump|" + | ||
519 | |||
520 | "find|format|gmatch|gsub|len|lower|match|pack|packsize|rep|reverse|" + | ||
521 | |||
522 | "sub|unpack|upper|concat|insert|move|pack|remove|sort|unpack|charpattern|" + | ||
523 | |||
524 | "codepoint|codes|offset|" + | ||
525 | |||
526 | "foreachi|maxn|foreach|concat|remove| | ||
527 | )))| | ||
528 | |Built-in constants|true~|false~|nil~|_G~|_VERSION| | ||
529 | |||
530 | * **Codes highlight** | ||
531 | |||
532 | |=**Code type**|=**Color** | ||
533 | |Normal code|Black | ||
534 | |Keyword|Red | ||
535 | |Variable|Black | ||
536 | |String|Blue | ||
537 | |Built-in method name|Green | ||
538 | |Constants and built-in constants|Purple | ||
539 | |Library function|Black | ||
540 | |Comments, ~[~[xx]]|Gray | ||
541 | |||
542 | **Note area** | ||
543 | |||
544 | (% style="text-align:center" %) | ||
545 | [[image:4-49.png]] | ||
546 | |||
547 | 1. It is located below the script editor and hidden by default. A prompt is displayed when user clicks a custom method name or the mouse moves over the toolbar button. | ||
548 | 1. Double click the prompt box or click the button [[image:4-49 2.png]] to close it. | ||
549 | 1. Click the up or down arrow to expand or collapse the prompt message. | ||
550 | |||
551 | **Save reminder** | ||
552 | |||
553 | If the script content is modified and not saved, a confirmation dialog box will be displayed when jumping to another module. The message varies with browsers. | ||
554 | |||
555 | (% style="text-align:center" %) | ||
556 | [[image:4-50.png]] | ||
557 | |||
558 | |||
559 | = Resumable upload = | ||
560 | |||
561 | Video: [[Resumable upload>>https://ftp.we-con.com.cn/Download/WIKI/V-BOX/Video/Resumableupload.mp4]] | ||
562 | |||
563 | 3000ig/8000ig HMI and RE/RH,E/H V-BOX can support a function for resumable upload. The function is to temporary save the data when the device is offline and upload those data to Cloud when the device is online again. | ||
564 | |||
565 | The following table shows the maximum number of the resumable data and the biggest file size of the resumable data: | ||
566 | |||
567 | |= |=RE/RH|=3000ig/8000ig HMI|=E/H V-BOX | ||
568 | |=data|100,000|100,000|2,000 | ||
569 | |=file size|2M|2M|N/A | ||
570 | |||
571 | (% class="box infomessage" %) | ||
572 | ((( | ||
573 | Note: | ||
574 | |||
575 | 1.The function don't configure by manual. | ||
576 | |||
577 | 2.When the device is online again, There is a keep-alive interval for about 30s. So data will be lost during the time. | ||
578 | ))) |