Changes for page 05 Lua Script

Last modified by Jett on 2025/06/07 17:34

From version 78.1
edited by Jett
on 2025/06/07 17:34
Change comment: There is no comment for this version
To version 72.1
edited by Jett
on 2024/11/26 19:41
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -1,8 +1,8 @@
1 -= **1 **Arithmetic operations =
1 += **1 64bits Address Basic Algorithm** =
2 2  
3 3  The example shows how to do the Addition, Subtraction, Multiplication and Division for HMI internal address.
4 4  
5 -[[Download link>>https://ftp.we-con.com.cn/Download/WIKI/PI%20HMI/Demo/Lua%20Script/Arithmetic%20operations%20by%20Lua%20V1.0.zip]]
5 +[[Download link>>https://ftp.we-con.com.cn/Download/WIKI/PI%20HMI/Demo/Lua%20Script/64bitCalculation.zip]]
6 6  
7 7  = **2 MQTT Client** =
8 8  
... ... @@ -89,7 +89,7 @@
89 89  
90 90  Error 1: 550 Access is denied
91 91  
92 -Open Windows Settings → Update & Security→ Windows Security→ Firewall & network protection→ Advanced setting→ Inbound Rules→ New Rules→ Next → choose "This program path"→ input "C:\Windows\System32\svchost.exe"→ Click "NEXT" continuously
92 +Open Windows Settings → Update & Security→ Windows Security→ Firewall & network protection→ Advanced setting→ Inbound Rules→ New Rules→ Next → choose "This program path"→ input ‘’C:\Windows\System32\svchost.exe‘’→ Click NEXT continuously
93 93  
94 94  (% style="text-align:center" %)
95 95  [[image:qCzqnKTUhp.png]]
... ... @@ -109,7 +109,7 @@
109 109  
110 110  Error 2: No route to host
111 111  
112 -The previous steps are the same as Error 1 → Port → specific local ports→ input port number "21"→ Click "NEXT" continuously
112 +The previous steps are the same as Error 1 → Port → specific local ports→ input port number 21→ Click NEXT continuously
113 113  
114 114  (% style="text-align:center" %)
115 115  [[image:fdsxie8WHc.png]]
... ... @@ -123,7 +123,7 @@
123 123  
124 124  [[Download link>>https://ftp.we-con.com.cn/Download/WIKI/PI%20HMI/Demo/Lua%20Script/Telegram.zip]]
125 125  
126 -= 9** LINE Notify(Not available now)** =
126 += 9** LINE Notify** =
127 127  
128 128  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.
129 129  
... ... @@ -132,11 +132,6 @@
132 132  
133 133  = 10** How to parse value from subscribing MQTT topic** =
134 134  
135 -(% class="box infomessage" %)
136 -(((
137 -**Only ig series can use this function.**
138 -)))
139 -
140 140  This example shows how to parse value from subscribing MQTT topic. Get the value and calculate the average value for group F1, F2, F3 and F4. The testing topic name is "testtopic/test/no1/123456".
141 141  
142 142  [[Download link>>https://ftp.we-con.com.cn/Download/WIKI/PI%20HMI/Demo/Lua%20Script/MQTT%20JSON%20parse.zip]]
... ... @@ -298,11 +298,6 @@
298 298  
299 299  = **13 MQTT Multi-link** =
300 300  
301 -(% class="box infomessage" %)
302 -(((
303 -**Only ig series can support this function.**
304 -)))
305 -
306 306  The example shows use mqtt realize multi-machine function:
307 307  
308 308  [[Download link>>https://ftp.we-con.com.cn/Download/WIKI/PI%20HMI/Demo/Lua%20Script/MQTT%20Multi-link.zip]]
... ... @@ -661,37 +661,11 @@
661 661  
662 662  = 24 ATC module Calling =
663 663  
664 -The example shows how to use HMI to customize communication with the ATC-3101 module via Lua script to make phone call.
654 +The example shows how to use HMI to customize communication with the ATC-3101 module via Lua script to make phone call
665 665  
666 -[[Download link>>https://ftp.we-con.com.cn/Download/WIKI/PI%20HMI/Demo/Lua%20Script/lua%20ATC%20calling.rar]]
656 +.[[Download link>>https://ftp.we-con.com.cn/Download/WIKI/PI%20HMI/Demo/Lua%20Script/lua%20ATC%20calling.rar]]
667 667  
668 668  (% class="box infomessage" %)
669 669  (((
670 670  Note:Due to differences in operators, it is recommended to test before use.
671 671  )))
672 -
673 -= 25 Lua SQLite =
674 -
675 -The example shows how to generate a user customized database and table via Lua script.
676 -
677 -[[Download link>>https://ftp.we-con.com.cn/Download/WIKI/PI%20HMI/Demo/Lua%20Script/SQL%20demo.zip]]
678 -
679 -~1. Choose the designate storage path of db file, here we choose the U disk;
680 -
681 -(% style="text-align:center" %)
682 -[[image:lgvAY47My2.png]]
683 -
684 -2. Create the database a.db and create the table filer;
685 -
686 -(% style="text-align:center" %)
687 -[[image:SbfZ7qC2qr.png]]
688 -
689 -3. Write the data of HDW10, then click Add data to insert new record into the table filer;
690 -
691 -(% style="text-align:center" %)
692 -[[image:sMi8nKsDCy.png]]
693 -
694 -4. Export the file a.db to PC, and using the DB Browser to view the created data(Because it is not standard data record file, not able to be recognized correctly by DataLogTool);
695 -
696 -(% style="text-align:center" %)
697 -[[image:xT8f08pfY0.png]]
1747813978928-699.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Hunter
Size
... ... @@ -1,1 +1,0 @@
1 -53.7 KB
Content
SbfZ7qC2qr.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Hunter
Size
... ... @@ -1,1 +1,0 @@
1 -15.3 KB
Content
lgvAY47My2.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Hunter
Size
... ... @@ -1,1 +1,0 @@
1 -18.0 KB
Content
lgvAY47MyI.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Hunter
Size
... ... @@ -1,1 +1,0 @@
1 -17.1 KB
Content
sMi8nKsDCy.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Hunter
Size
... ... @@ -1,1 +1,0 @@
1 -17.3 KB
Content
xT8f08pfY0.png
Author
... ... @@ -1,1 +1,0 @@
1 -XWiki.Hunter
Size
... ... @@ -1,1 +1,0 @@
1 -38.3 KB
Content