c# - C\C++ 内置的 dll 是否在 LabView 中实时运行

标签 c# c++ c labview

我想在 LabView 中使用 C\C++ 生成的 DLL,例如 this examplethis one . 我想知道它是在我的目标机器(我的 PXIe)上部署和运行代码,还是在运行 LabView 的计算机上运行 DLL。 国家仪器,在其using external codes in LabView第 15 页,在两种调用方法的特征下,提到,

  1. You compile the source code and link it to form executable code. If you already have a compiled DLL, this step is not necessary.
  2. LabVIEW calls the executable code when the Call Library Function Node or CIN executes.
  3. LabVIEW passes input data from the block diagram to the executable code.
  4. LabVIEW returns data from the executable code to the block diagram.

我认为它没有阐明 DLL 是否在目标设备上运行,也就是实时运行。 此外,我发现this document这非常令人困惑,因为它没有直接引用任何特定方法。

旁注:我需要在 PXIe 上运行 C/C++ 代码,并且需要从我的 LabVIEW 代码实时调用它。

最佳答案

我从来没有这样做过,所以我只能尝试给出一些可能有帮助的提示:

  • 如果要使用 dll,它必须在运行 LabVIEW 应用程序的目标上运行:如果您的应用程序在台式计算机上运行,​​则在台式计算机上访问 dll。如果您的应用程序在 PXI 上运行,则 dll 必须在 PXI 上运行。

  • 看看this NI website :

    If the shared library is C++-based, National Instruments strongly recommends using the MSVC 2009 or MSVC 2010 compilers.

    If your DLL works on a Windows machine, it may work in LabVIEW Real-Time (NI PharLap ETS). However, the code will fail if it calls functions that are not included in the Real-Time operating system's subset of Win32.

    在这个网站上,他们还有一个工具可以检查特定的 dll 是否可以工作。

关于c# - C\C++ 内置的 dll 是否在 LabView 中实时运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57830441/

相关文章:

C# 窗体 : insert url parameter

c# - 如何在通用实体上设置属性?

c# - NUnit - 是否可以在 TearDown 中检查测试是否成功?

c++ - double *vec 和 double vec[] 的区别

c++ - 为什么RGB888转RGB565多次会出现颜色丢失?

c - scanf 之后 fgets 不起作用

c# - 如何通过属性在 C# 中搜索方法?

c++ - 为什么 GUID 的 IsEqualGUID() 和 "operator =="声明为返回 int?

c - 字符串的哈希算法

OpenGL ES 片段着色器可以更改片段的深度值吗?