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, 2 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -545,4 +545,22 @@ 545 545 (% style="text-align:center" %) 546 546 [[image:celllocation.png]] 547 547 548 - 548 += 18 How to convert a number to a string = 549 + 550 +The example shows how to convert a number to a string using the "tostring()" function. 551 + 552 +[[Download link>>https://ftp.we-con.com.cn/Download/WIKI/PI%20HMI/Demo/Lua%20Script/Number%20to%20string.zip]] 553 + 554 +Note:This demo converts a 64-bit floating to a string,you can change the data format of "@W_HDW0" depand on requirements 555 + 556 +The core code is from file convert.lua: 557 + 558 +(% style="text-align:center" %) 559 +[[image:convert.lua.png]] 560 + 561 +The HMI offline simulator result: 562 + 563 +(% style="text-align:center" %) 564 +[[image:Converttestdisplay.png]] 565 + 566 += 19 HUAWEI CLOUD & OpenCloud =
- Converttestdisplay.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.DevinChen - Size
-
... ... @@ -1,0 +1,1 @@ 1 +37.0 KB - Content
- convert.lua.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.DevinChen - Size
-
... ... @@ -1,0 +1,1 @@ 1 +28.6 KB - Content