Changes for page 05 Lua Script
Last modified by Joe on 2026/05/21 13:49
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -48,32 +48,29 @@ 48 48 (% style="text-align:center" %) 49 49 [[image:dZyxVCtWDz.png]] 50 50 51 -(% class="box infomessage" %) 52 -((( 53 -Note:About how to set up the FTP server in Windows PC: **[[How to set up and manage an FTP server on Windows 10>>https://www.windowscentral.com/how-set-and-manage-ftp-server-windows-10]]** 54 -))) 51 +~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]]** 55 55 56 - 1.Enter PC (FTP Server) IP address and port number (Default 21).53 +2. Enter PC (FTP Server) IP address and port number (Default 21). 57 57 58 58 (% style="text-align:center" %) 59 59 [[image:LuaFTPDemoIP&Port.png]] 60 60 61 - 2.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.58 +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. 62 62 63 63 (% style="text-align:center" %) 64 64 [[image:LuaFTPDemoUpload.png]] 65 65 66 - 3.Change drive letter of file save path according to drop-down list (There are three option available: Flash, UDisk and SDCard).63 +4. Change drive letter of file save path according to drop-down list (There are three option available: Flash, UDisk and SDCard). 67 67 68 68 (% style="text-align:center" %) 69 69 [[image:LuaFTPDemoDropBox.png]] 70 70 71 - 4.Change the filename of the file that needs to be downloaded from PC(Server).68 +5. Change the filename of the file that needs to be downloaded from PC(Server). 72 72 73 73 (% style="text-align:center" %) 74 74 [[image:LuaFTPDemoDownload.png]] 75 75 76 - 5.Set the default configuration in file "Script_BG.lua"73 +6. Set the default configuration in file "Script_BG.lua" 77 77 78 78 (% style="text-align:center" %) 79 79 [[image:LuaFTPDemoInitial.png]] ... ... @@ -126,9 +126,6 @@ 126 126 127 127 [[Download link>>https://ftp.we-con.com.cn/Download/WIKI/PI%20HMI/Demo/Lua%20Script/Telegram.zip]] 128 128 129 - 130 -[[URL Encode Table for Special Characters>>https://docs.we-con.com.cn/bin/view/PIStudio/FAQ/Why%20can't%20I%20receive%20HMI%20messages%20on%20Telegram]] 131 - 132 132 = 9** LINE Notify(Not available now)** = 133 133 134 134 This example shows how to use the LINE Notify to send message into LINE group. When monitoring bit "@B_HDX0.0" changes, it will trigger and send the message. Please replace with your own Token. ... ... @@ -702,29 +702,11 @@ 702 702 (% style="text-align:center" %) 703 703 [[image:xT8f08pfY0.png]] 704 704 705 -= 26 Send attachment picture with SMTP by Gmail = 699 += [[26. Send attachment picture with SMTP by Gmail>>https://ftp.we-con.com.cn/Download/WIKI/PI%20HMI/Demo/Lua%20Script/SMTP%20for%20Gmail%28with%20Attachment%20picture%20%29.zip]] = 706 706 707 707 The project is to send mail message with text and attachment picture called test.png. 708 708 709 -[[Download link>>https://ftp.we-con.com.cn/Download/WIKI/PI%20HMI/Demo/Lua%20Script/SMTP%20for%20Gmail%28with%20Attachment%20picture%20%29.zip]] 710 710 711 -= 27 TTS function = 704 += [[27. Music Player and alarm sound with TTS function>>https://ftp.we-con.com.cn/Download/WIKI/PI%20HMI/Demo/Lua%20Script/Music%20player.pi2]] = 712 712 713 713 The project is to show a Music Player and alarm sound with TTS function in Lua script. Please note that use PI version 10.4 or higher to open the project. 714 - 715 -[[Download link>>https://ftp.we-con.com.cn/Download/WIKI/PI%20HMI/Demo/Lua%20Script/Music%20player.pi2]] 716 - 717 -= 28 Google Sheets API = 718 - 719 -The example shows how to send the data into the Google sheets API via Lua script. [[Jump to Video>>https://youtu.be/VKjr3_MVNzc]] 720 - 721 -{{warning}} 722 -since the HMI lacks a built-in library for cryptographic signatures (RS256/JWT), user can automate this by sending the token to the HMI via external communication. Token need to be manual input in this project. 723 -{{/warning}} 724 - 725 -[[Download link>>https://ftp.we-con.com.cn/Download/WIKI/PI%20HMI/Demo/Lua%20Script/GoogleSheet.zip]] 726 - 727 -= 29 Graphics Drawing = 728 - 729 -The example shows drawing a snow and a star on the HMI screen with drawing function from Lua Script.Please note that use PI version 10.6 or higher to open the project. 730 -[[Download link>>https://ftp.we-con.com.cn/Download/WIKI/PI%20HMI/Demo/Lua%20Script/Graphics%20Drawing.pi2]]