Changes for page 2 Script

Last modified by Devin Chen on 2025/06/06 14:03

From version 50.1
edited by Hunter
on 2023/05/06 10:12
Change comment: There is no comment for this version
To version 41.1
edited by Hunter
on 2023/03/17 18:05
Change comment: There is no comment for this version

Summary

Details

Page properties
Content
... ... @@ -145,7 +145,7 @@
145 145  
146 146  This example shows how to use the LINE Notify to send message into LINE group. When monitoring bit "@test" changes, it will trigger and send the message. Please replace with your own Token.
147 147  
148 -{{code language="lua"}}
148 +{{code}}
149 149  local tempBit = 0
150 150  local tempWord = 0
151 151  
... ... @@ -447,37 +447,6 @@
447 447  end
448 448  {{/code}}
449 449  
450 -== **1.9 High-Low Byte Switch** ==
451 -
452 -The following example is converting the floating number from order 1234 to order 3412, and formating output the number with 2 decimal point. About which high-low word order corresponding to which value, please refer to the [[Address Operation Table>>doc:V-BOX.V-Net.Manual.04 Lua Script.01 Lua Functions.WebHome||anchor="H2Addressoperation"]].
453 -
454 -{{code language="lua"}}
455 -function highLowByteSwitch(floatNumber)
456 - addr_setfloat("@W_0#HDW23036",floatNumber,0,2)
457 - local newFloat = addr_getfloat("@W_0#HDW23036")
458 - local formattedFloat = string.format("%.2f",newFloat)
459 - print("The formatted float value is the : "..formattedFloat)
460 - return formattedFloat
461 -end
462 -{{/code}}
463 -
464 -== **1.10 Read 64bits Unsigned Value** ==
465 -
466 -In our built-in function library doesn't have the function for reading 64-bit unsigned format value, so the following function is for solve this. But if the number is greater 2^53, the precision will be lost. So the final result will be a little bit different from the original value.
467 -
468 -{{code language="lua"}}
469 -function addr_getquatra(address)
470 - local highAddress = addr_newnoaddr(address,2)
471 - local low32 = addr_getdword(address)
472 - local high32 = addr_getdword(highAddress)
473 - --print("the low number is "..low32)
474 - --print("the high number is "..high32)
475 - local formatVal = string.format("%64.0f",2^32*high32+low32)
476 - print("the format value is ".. formatVal)
477 - return formatVal
478 -end
479 -{{/code}}
480 -
481 481  = **2 V-Box connect with third part server** =
482 482  
483 483  V-Box have two mode.One is for V-Net,User need to use WECON server to store data.We call this V-NET platform.