Changes for page 05 Lua Script

Last modified by Devin Chen on 2025/03/04 14:07

From version 49.1
edited by Devin Chen
on 2023/08/17 18:36
Change comment: There is no comment for this version
To version 58.1
edited by Joe
on 2024/09/06 10:58
Change comment: There is no comment for this version

Summary

Details

Page properties
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.DevinChen
1 +XWiki.joe
Content
... ... @@ -67,11 +67,39 @@
67 67  (% style="text-align:center" %)
68 68  [[image:LuaFTPDemoInitial.png]]
69 69  
70 +(% class="box infomessage" %)
71 +(((
70 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 "~/~/".
73 +)))
71 71  
72 72  (% style="text-align:center" %)
73 73  [[image:LuaFTPDemoFilelist.png]]
74 74  
78 +**Common error:**
79 +
80 + In the demo project, if there are some errors in HMI for testing, please check the following steps.
81 +
82 +Error 1: 550 Access is denied
83 +
84 +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
85 +
86 +(% style="text-align:center" %)
87 +[[image:qCzqnKTUhp.png]]
88 +
89 +(% style="text-align:center" %)
90 +[[image:vfrt3NElMX.png]]
91 +
92 +(% style="text-align:center" %)
93 +[[image:dAuz25bdvM.png]]
94 +
95 +(% style="text-align:center" %)
96 +[[image:rxQIJkX8ll.png]]
97 +
98 +(% style="text-align:center" %)
99 +[[image:vmG8WGu5P2.png]]
100 +
101 +
102 +
75 75  = **8 Telegram Notification** =
76 76  
77 77  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.
... ... @@ -551,7 +551,7 @@
551 551  
552 552  [[Download link>>https://ftp.we-con.com.cn/Download/WIKI/PI%20HMI/Demo/Lua%20Script/Number%20to%20string.zip]]
553 553  
554 -Note:This demo converts a 64-bit floating to a string,you can change the data format depand on requirements
582 +Note:This demo converts a 64-bit floating to a string,you can change the data format of "@W_HDW0" depand on requirements
555 555  
556 556  The core code is from file convert.lua:
557 557  
... ... @@ -562,3 +562,39 @@
562 562  
563 563  (% style="text-align:center" %)
564 564  [[image:Converttestdisplay.png]]
593 +
594 += 19 HUAWEI CLOUD & OpenCloud =
595 +
596 +About the details, please check the powerpoint or video of Lua MQTT & OpenCloud [[Jump To>>doc:PIStudio.Download.1 Manual.WebHome]]
597 +
598 +[[Download link>>https://ftp.we-con.com.cn/Download/WIKI/PI%20HMI/Demo/Lua%20Script/HuaweiMQ%281%29.zip]]
599 +
600 += 20 UDP Multicast =
601 +
602 +The example shows how to use UDP multicast feature to send and receive data.
603 +
604 +[[Download link>>https://ftp.we-con.com.cn/Download/WIKI/PI%20HMI/Demo/Lua%20Script/UDP%20Multicast.zip]]
605 +
606 +About the details, please check the [[UDP module>>https://docs.we-con.com.cn/bin/view/PIStudio/09%20Lua%20Editor/Lua%20Script/#HUDPmodule-1]]
607 +
608 += 21 ATC module **send SMS** =
609 +
610 +The example shows how to use HMI to customize communication with the ATC SMS module via Lua script to send SMS.
611 +
612 +[[Download link>>https://ftp.we-con.com.cn/Download/WIKI/PI%20HMI/Demo/Lua%20Script/SMS.zip]]
613 +
614 += 22 TCP Client =
615 +
616 +The example shows how to use the Lua Socket TCP module to connect with a TCP server.
617 +
618 +[[Download link>>https://ftp.we-con.com.cn/Download/WIKI/PI%20HMI/Demo/Lua%20Script/TCP%20ClientV1.1.zip]]
619 +
620 +~1. Set the initial values of Server IP and port number.
621 +
622 +(% style="text-align:center" %)
623 +[[image:vcbt6CE6EL.png]]
624 +
625 +2. Set the actual receive length of TCP message according to the actual needs.
626 +
627 +(% style="text-align:center" %)
628 +[[image:tPN1mbz7ny.png]]
1721298723226-463.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Hunter
Size
... ... @@ -1,0 +1,1 @@
1 +33.9 KB
Content
dAuz25bdvM.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.joe
Size
... ... @@ -1,0 +1,1 @@
1 +245.8 KB
Content
qCzqnKTUhp.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.joe
Size
... ... @@ -1,0 +1,1 @@
1 +30.0 KB
Content
rxQIJkX8ll.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.joe
Size
... ... @@ -1,0 +1,1 @@
1 +22.1 KB
Content
tPN1mbz7ny.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Hunter
Size
... ... @@ -1,0 +1,1 @@
1 +59.4 KB
Content
vcbt6CE6EL.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.Hunter
Size
... ... @@ -1,0 +1,1 @@
1 +33.9 KB
Content
vfrt3NElMX.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.joe
Size
... ... @@ -1,0 +1,1 @@
1 +234.9 KB
Content
vmG8WGu5P2.png
Author
... ... @@ -1,0 +1,1 @@
1 +XWiki.joe
Size
... ... @@ -1,0 +1,1 @@
1 +22.1 KB
Content