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, 6 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -38,16 +38,40 @@ 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 - Step1: About howto set up the FTP server inWindows PC: **[[Buildan FTP Site onIIS>>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 anFTPserver on Windows 10>>https://www.windowscentral.com/how-set-and-manage-ftp-server-windows-10]]**41 +[[Download link>>https://ftp.we-con.com.cn/Download/WIKI/PI%20HMI/Demo/Lua%20Script/FTP%20Client.zip]] 42 42 43 - Step2: Change theIP,port, usernameandpassword in Script_BG.lua, toconnect user's own.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 45 - Step3:Changethefilenamewanttodownload or upload in Script_BG.lua45 +2. Enter PC (FTP Server) IP address and port number (Default 21). 46 46 47 -Step4: Change the string "udisk:smtp.jpg", into the storage path user want to download from FTP server save to HMI, in function Main_download() in Main.lua. 47 +(% style="text-align:center" %) 48 +[[image:LuaFTPDemoIP&Port.png]] 48 48 49 - [[Downloadlink>>https://ftp.we-con.com.cn/Download/WIKI/PI%20HMI/Demo/Lua%20Script/FTP%20Client.zip]]50 +3. Change the filename of the file that needs to be uploaded. If run on as Offline Simulator, the simulate upload path of "udisk:1.png" will be "C:\WECON\USB\1.png" on the PC. 50 50 52 +(% style="text-align:center" %) 53 +[[image:LuaFTPDemoUpload.png]] 54 + 55 +4. Change drive letter of file save path according to drop-down list (There are three option available: Flash, UDisk and SDCard). 56 + 57 +(% style="text-align:center" %) 58 +[[image:LuaFTPDemoDropBox.png]] 59 + 60 +5. Change the filename of the file that needs to be downloaded from PC(Server). 61 + 62 +(% style="text-align:center" %) 63 +[[image:LuaFTPDemoDownload.png]] 64 + 65 +6. Set the default configuration in file "Script_BG.lua" 66 + 67 +(% style="text-align:center" %) 68 +[[image:LuaFTPDemoInitial.png]] 69 + 70 +✎Note: If want to confirm whether it is downloaded successfully, please add a File list object to check in HMI project. If saved path is root path (same to the all three drive), please set the folder as "~/~/". 71 + 72 +(% style="text-align:center" %) 73 +[[image:LuaFTPDemoFilelist.png]] 74 + 51 51 = **8 Telegram Notification** = 52 52 53 53 The example shows how to use Bot API to push the notification to channel or group of Telegram. Please change the Token and Chat id to users' own one.
- LuaFTPDemoDownload.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Hunter - Size
-
... ... @@ -1,0 +1,1 @@ 1 +26.2 KB - Content
- LuaFTPDemoDropBox.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Hunter - Size
-
... ... @@ -1,0 +1,1 @@ 1 +29.2 KB - Content
- LuaFTPDemoFilelist.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Hunter - Size
-
... ... @@ -1,0 +1,1 @@ 1 +16.5 KB - Content
- LuaFTPDemoIP&Port.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Hunter - Size
-
... ... @@ -1,0 +1,1 @@ 1 +26.4 KB - Content
- LuaFTPDemoInitial.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Hunter - Size
-
... ... @@ -1,0 +1,1 @@ 1 +55.5 KB - Content
- LuaFTPDemoUpload.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.Hunter - Size
-
... ... @@ -1,0 +1,1 @@ 1 +26.6 KB - Content