Changes for page 05 Lua Script
Last modified by Devin Chen on 2025/03/04 14:07
Summary
-
Page properties (1 modified, 0 added, 0 removed)
-
Attachments (0 modified, 1 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -38,7 +38,7 @@ 38 38 39 39 The example shows how the to establish the FTP server at WIN10 OS and make the HMI as FTP client. 40 40 41 -[[Download link>>https://ftp.we-con.com.cn/Download/WIKI/PI%20HMI/Demo/Lua%20Script/FTP%20Client.zip]] 41 +[[Download link>>https://ftp.we-con.com.cn/Download/WIKI/PI%20HMI/Demo/Lua%20Script/FTP%20ClientV2.zip]] 42 42 43 43 ~1. About how to set up the FTP server in Windows PC: **[[Build an FTP Site on IIS>>https://docs.microsoft.com/en-us/iis/publish/using-the-ftp-service/scenario-build-an-ftp-site-on-iis]] **,** [[How to set up and manage an FTP server on Windows 10>>https://www.windowscentral.com/how-set-and-manage-ftp-server-windows-10]]** 44 44 ... ... @@ -529,11 +529,20 @@ 529 529 530 530 [[Download link>>https://ftp.we-con.com.cn/Download/WIKI/PI%20HMI/Demo/Lua%20Script/csvRead.zip]] 531 531 532 -The core code is from file readcsv.lua , and file path is set as Sheet_2023_06_13_15_29_45.csv at the root path for USB.532 +The core code is from file readcsv.lua: 533 533 534 -1) The reading contentisawo-dimensionaltable,can usethetableindextolacatethespecifydatacell;534 +1) The file path is set as Sheet_2023_06_13_15_29_45.csv at the root path for USB; 535 535 536 536 2) Remember to change csv separator in the second parameter from function csv_csvToTable according to user's need, this demo is using **semicolon** as separator; 537 537 538 538 (% style="text-align:center" %) 539 539 [[image:CSVreadwithsemicolon.png]] 540 + 541 +3) The reading content is a two-dimensional table, can use the table index to locate the specify data cell; 542 + 543 +For example, want to read the 2nd row C column from the table, the table index will be like table[2][3]. 544 + 545 +(% style="text-align:center" %) 546 +[[image:celllocation.png]] 547 + 548 +
- celllocation.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Hunter - Size
-
... ... @@ -1,0 +1,1 @@ 1 +12.6 KB - Content