Wiki source code of 05 Lua Script
Hide last authors
author | version | line-number | content |
---|---|---|---|
![]() |
1.1 | 1 | = **1 64bits Address Basic Algorithm** = |
2 | |||
3 | The example shows how to do the Addition, Subtraction, Multiplication and Division for HMI internal address. | ||
4 | |||
5 | [[Download link>>https://drive.google.com/file/d/1ji5RbQJzUn_rQ2couX062fYt_6dqQNRb/view?usp=sharing]] | ||
6 | |||
7 | = **2 MQTT** = | ||
8 | |||
9 | The example shows how to connect to the MQTT server.(Test on MaQiaTTo) | ||
10 | |||
11 | [[Download link>>https://drive.google.com/file/d/1DY-VGRMBZrxfPHF3qLrgZ-1fJBCOK-q5/view]] | ||
12 | |||
13 | = **3 Timer** = | ||
14 | |||
15 | The example shows how to use the Lua Timer function. | ||
16 | |||
17 | [[Download link>>https://drive.google.com/file/d/1iwD2Kca9SIAGCYFBaQbn26zdc4kIUuSV/view?usp=sharing]] | ||
18 | |||
19 | = **4 Trigger** = | ||
20 | |||
21 | The example shows how to use the Lua Trigger function. | ||
22 | |||
23 | [[Download link>>https://drive.google.com/file/d/1GDCbbMgNSixonXP2erA0VoJbo7qagsCv/view?usp=sharing]] | ||
24 | |||
25 | = **5 User Free Protocol** = | ||
26 | |||
27 | The example shows the simple write and read of User Free protocol | ||
28 | |||
![]() |
2.1 | 29 | [[Download link>>https://drive.google.com/file/d/1NZoKRbXL66wTnEOz1yW7ebAjZm_hjBT1/view?usp=sharing]] |
![]() |
1.1 | 30 | |
31 | = **6 Arabic Keypad** = | ||
32 | |||
33 | The example shows how to use the Lua to achieve the Arabic keypad. Also available for other non-English language like Cyrillic. | ||
34 | |||
35 | [[Download link>>https://drive.google.com/file/d/1JqpTRRqj6db32aLn7tqqO8dWT6EuXBEL/view?usp=sharing]] | ||
![]() |
3.1 | 36 | |
37 | = **7 FTP Client** = | ||
38 | |||
![]() |
8.1 | 39 | The example shows how the to establish the FTP server at WIN10 OS and make the HMI as FTP client. |
![]() |
3.1 | 40 | |
![]() |
11.1 | 41 | Step1: 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]]** |
![]() |
7.1 | 42 | |
![]() |
8.1 | 43 | Step2: Change the IP, port, username and password in Script_BG.lua, to connect user's own server. |
![]() |
7.1 | 44 | |
![]() |
8.1 | 45 | Step3: Change the filename want to download or upload in Script_BG.lua |
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. | ||
48 | |||
![]() |
3.1 | 49 | [[Download link>>https://drive.google.com/file/d/1b0g3eA_2TSdXqLM_hpv9l2Wq0Yq-13nf/view?usp=sharing]] |
![]() |
4.1 | 50 | |
51 | = **8 Telegram Notification** = | ||
52 | |||
![]() |
5.1 | 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. |
![]() |
4.1 | 54 | |
55 | [[Download link>>https://drive.google.com/file/d/1wV0O79TJ2mgUEBkKcjrb53PM8DkTQxVo/view?usp=sharing]] |