LabVIEW 到 C# 的转换
LabVIEW 到 C# 转换(将 VI 转换为 C# 代码)需要哪些软件,除了 LabVIEW 和 Microsoft Visual Studio。
What are all the Softwares needed for LabVIEW to C# Conversion(Converting VIs into C# Code)Except LabVIEW and Microsoft Visual Studio.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
如果您正在寻求将 LabVIEW 代码自动转换为 C#,则不存在这样的工具,您必须手动重写它。
If you're looking for automatic conversion of LabVIEW code to C#, no such tool exist, you have to rewrite it by hand.
LabVIEW VI 是二进制的,据我所知,除了 LabVIEW 本身之外,没有其他工具可以理解它们。
我认为通过使用Measurement Studio,您可以与.NET中的NI硬件进行交互,但我不认为您可以从dll访问LabVIEW中内置的所有VI。
LabVIEW VI's are binary and as far as I know there is no other tool, besides LabVIEW itself, that understands them.
I think that by using Measurement Studio you could interface with NI hardware in .NET, but I don't think you can access all the VI's built in to LabVIEW from dlls.
不是 C#,但在某些情况下可能有用:
NI LabVIEW C生成器
Not C# but may be useful in certain instances:
NI LabVIEW C Generator
不存在任何工具(据美国国家仪器公司所知)可以满足您的需求。对不起。
No tool exists (that National Instruments knows of) that does what you're looking for. Sorry.
我们有 pylabview 可以将 VI 转换为 XML(以及反之)。
它将所有内容转换为 XML 还是保留一些二进制块取决于用于创建 te 文件的 LV 版本。如果框图被转换为 XML,那么您可以编写一个解析器来读取该框图并将其转换为任何输出。
We have pylabview which converts VIs to XML (and back).
Whether it will convert everything to XML or leave some binary chunks depends on LV version used to create te files though. If Block Diagram was converted to XML, then you could write a parser which reads that and transforms to any output.
一般来说,如果您想从 C# 调用 LabVIEW 代码,最好将 VI 转换为 dll 库,然后像任何程序集一样从 C# 导入它。
查看此示例。您还可以观看此视频介绍 LabVIEW dll 库的基本创建
As a general rule, if you want to call LabVIEW code from C#, it is better to convert your VIs into dll library, then import it from C# like any assembly.
Check this example.You may also watch this video for basic creation of LabVIEW dll library
手动重写代码是唯一的方法。可能没有你想象的那么痛苦。我刚刚将一些 LabVIEW 项目转换为 Python 脚本,相比之下,Python 脚本出奇地简单且小得多。
祝你好运!
Manually rewrite the code is the only way. Might not be as painful as you think. I just converted a few LabVIEW projects to Python scripts and the Python script was surprisingly easier and much smaller in comparison.
Good luck!