- 首先,我们需要验证 Linux 发行版是否被受支持。您可以在相关链接部分找到有关此内容的文档。
- 需要要解决这个问题,我们是必须先考虑到 Linux 系统是不支持于共享变量,您可以参考文档中的图表 1:在相关链接部分中的使用 LabVIEW 共享变量。
- 查看NI-RIO Driver 17.0 for Linux Readme,我们可以发现:
"In order to use NI-RIO on Linux, you need a Windows system to develop your LabVIEW FPGA application. You must compile a bitfile, generate headers with the FPGA Interface C API Generator or FPGA Interface Python API, and then move the application to your Linux system. Refer to the "Using the NI-RIO Driver and FPGA Interface C API" and "Using the NI-RIO Driver and FPGA Interface Python API" sections for more information.
------------------------------------------------
Using the NI-RIO Driver and FPGA Interface C API
------------------------------------------------
You must begin development on a computer running Windows. Use LabVIEW FPGA to develop and build an FPGA VI that runs on a RIO device. Use the FPGA Interface C API Generator to create the C source files for your application. Visit ni.com/info and enter the Info Code fpgainterfacecapi to get the latest version of the FPGA Interface C API Generator. Then copy the generated files to the Linux machine to begin development of C/C++ code for your application. For information about using the FPGA Interface C API, visit ni.com/info and enter the Info Code fpgainterfacecapihelp.
To find the RIO device you are using in your application, use the command "lsni -v" to list information on all NI devices in the system."
对此,将 cRIO 或 MyRIO 与 Linux 电脑通信的选项将使用 cRIO / MyRIO FPGA 与 Linux 上的 C 程序通信。我们可以总结为以下步骤:
-
使用 LabVIEW 创建您的主 cRIO / MyRIO 程序并将信息传递给 FPGA。您可以在相关链接部分查看相关文档:
-
Communicate Between FPGA, Real-Time Processor, and Distributed Systems
-
Understanding Communication Options Between the Windows HMI, RT Processor, and FPGA
-
使用 LabVIEW 创建一个 FPGA 程序,从主 RT 程序获取数据并将其发送到 Linux 电脑。为此,您可以查看此文档:
-
使用 LabVIEW FPGA 接口 C API 创建一个 C 程序以在 Linux 上使用其来读取 cRIO 或 MyRIO FPGA。为此,您可以查看以下文档:
下图总结了解决方案: