找回密码
 注册
LabVIEW+单片机学习套件全套教程资料下载[免费]LabVIEW论坛精华列表贴USB0816数据采集卡《LabVIEW宝典》
LabWindows/CVI论坛精华贴NET0816以太网数据采集卡RC0210远程设备授权系统 关闭关停锁定打开设备 户外分布式数据采集
NET1624低速高精度以太网数据采集卡WIFI0824SD无线WIFI网络数据采集卡脱机运行 SD存储 小尺寸微型 串口采集远程采集 安卓 手持移动采集 纪录仪
查看: 1187|回复: 5

LuaVIEW?

[复制链接]
发表于 2008-10-9 02:24:23 | 显示全部楼层 |阅读模式
这个东西的功能也比较强大, 哪位知道这方面的入门介绍? 比较中文且通俗一些的, 官方的介绍看起来有些累人.
file:///C:/DOCUME%7E1/MARLON%7E1/LOCALS%7E1/Temp/moz-screenshot.jpghttp://www.citengineering.com/LuaVIEW/
LuaVIEW is a toolkit for scriptingLabVIEW and for creating scriptable LabVIEW applications. The toolkit embeds the simple yet powerful Lua scripting languageinto LabVIEW so that Lua scripts can run inside the LabVIEW runtime.Custom LabVIEW-implemented functions can be called from Lua so that there are nolimits to what can be scripted. LuaVIEW also provides tools for architecting modular LabVIEW applications withimproved error handling.

Labc

[ 本帖最后由 labc 于 2008-10-9 02:27 编辑 ]

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
发表于 2008-10-9 11:01:21 | 显示全部楼层
Lua - The Language 1 控制结构、table数据结构
1。用[[xxxxx]]直接引用字符串,类似于C#里的 @"xxxxx"。
   
比如:                       [[alo          [[
        "alo\n123\""    =   123"]]     =   alo
                                           123"]]

2。循环结构和选择结构

-- for and if
for i = 1,5 do
print("i is now "..i)
    if i < 2 then
     print("small")
    elseif i < 4 then
     print("medium")
    else
     print("big")
    end
end

-- while
i=1
while i <=5 do
print("i is now "..i)
    if i < 2 then
     print("small")
    elseif i < 4 then
     print("medium")
    else
     print("big")
    end
    i = i+1
end

-- repeat until,注意没有end
i=1
repeat
print("i is now "..i)
    if i < 2 then
     print("small")
    elseif i < 4 then
     print("medium")
    else
     print("big")
    end
    i = i+1
until i == 6

输出结果:
i is now 1
small
i is now 2
medium
i is now 3
medium
i is now 4
big
i is now 5
big

3。简单的table结构

-- Arrays
myData = {}
myData[0] = "foo"
myData[1] = 42

-- Hash tables
myData["bar"] = "baz"

-- Iterate through the structure
for key,value in myData do
print(key .. "=" .. value)
end

输出结果:
1=42
0=foo
bar=baz

4。嵌套的table结构

-- table结构
myPolygon = {
color="blue",
thickness=2,
npoints=4;
{x=0,y=0},
{x=-10,y=0},
{x=-5,y=4},
}

-- 索引形式
print(myPolygon["color"])

-- 点形式
print(myPolygon.thickness)

-- 三个子表,分别是myPolygon[1] 到 myPolygon[3]
print(myPolygon[2].x)
print(myPolygon[3]["y"])

输出结果:
blue
2
-10
4
回复 顶

使用道具 举报

发表于 2008-10-9 11:02:53 | 显示全部楼层
将LUA的编译器完成cin的调用,实现代码式的功能。
原理上和LV的PDA工具包的C节点,以及LV的matlab script有相近之处;
本版的cpuview也同样是调用外部编译器。
回复 顶

使用道具 举报

发表于 2008-10-9 11:03:45 | 显示全部楼层
只要学会了Lua编程语言,则可以采用它这个工具包来做了。
回复 顶

使用道具 举报

 楼主| 发表于 2008-10-10 16:20:20 | 显示全部楼层
回复 顶

使用道具 举报

发表于 2009-11-11 17:51:34 | 显示全部楼层
回复 顶

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|cpubbs论坛. ( 粤ICP备09171248号 )

GMT+8, 2026-9-29 11:47 , Processed in 0.045557 second(s), 11 queries , Gzip On, File On.

Powered by Discuz! X5.0

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表