Linux中M Series板卡DIO有限点模式实现环境搭建



硬件: Multifunction DAQ (MIO)

问题: 在Linux下使用DAQmx Base驱动,LabVIEW控制PCIe-6221板卡的DIO,使用有限点生成模式会报错,如何解决。

解答: DAQmx Base是Linux下新版本的DAQ驱动,但是LabVIEW中使用该驱动控制M Series的DIO进行有限点生成时,会报错,显示不支持该功能。在很多客户的应用中,就需要用有限点产生脉冲序列,实现命令的通信。该功能的确实给实际应用带来了很多不便。

在有的KB中已经有文章指出了该问题,比如如下链接,但并未指出如何能够使DIO以有限点模式生成:http://digital.ni.com/public.nsf/allkb/C3FD3EA31892922E862570CB0061876D?OpenDocument

本文采用openSUSE 11.2和LabVIEW 8.6版本以及DAQmx for Linux 8.0.2版本实现最终功能。接下来将以版本关系和安装指南组织内容。

1. 版本关系

DAQmx for Linux虽然是过时的DAQ驱动版本,但是由于它难得的支持M Series板卡DIO的有限点生成,所以需要选择DAQmx的最新版本8.0.2作为最终DAQ的版本。同时如图1所示,由于DAQmx for Linux 8.0.2官方最高只支持到LabVIEW for Linux 8.6,所以LabVIEW需要选择8.6版本(对于更高版本的LabVIEW安装DAQmx 8.0.2,可以参考下面的KB:How to install DAQmx 8.0.2 and LabVIEW 2011 under RHEL (CentOS) 6)。最后如图2所示,DAQmx 8.0.2版本能够安装的openSUSE版本是有限的,所以选择openSUSE 11.2版本。正式因为这样的依赖关系,最终版本情况如表1所示:

Table 1 Edition



图1


图2

2. 安装指南

更新系统中的软件,如图3。


图3

把gcc安装上,如图4。


图4

搜索kernel source,把如下kernel-source安装,如图5。


图5

之后就可以安装LabVIEW了,如图6。


图6

之后都yes,这个过程就会把LabVIEW 8.6、VISA和488.2都安装上,如图7。


图7

之后安装daqmx的时候会遇到openSUSE特有的问题,解决方式在Readme文件中提到如下,照着做一遍就可以了:

On openSUSE complete the following steps:

1. Ensure you have installed kernel-source and kernel-syms packages
corresponding to the version of the currently running kernel. The version of
the currently running kernel can be determined by issuing the command
"uname -r".

2. Change the directory to the /usr/src/linux-<version> directory, where
<version> corresponds to the currently running kernel version.

3. Run "zcat /boot/symvers-<version>.gz > Module.symvers" as root to prepare
modversion support.

4. Run "make cloneconfig" as root to configure the sources for the currently
running kernel.

5. Run "make modules_prepare" as root to prepare the headers for compilation.

6. Run the NI-DAQmx INSTALL script.


之后DAQmx就能够安装成功了

这样,LabVIEW 8.6、VISA、488.2和DAQmx都安装成功,如下图8。


图8
c

相关链接:

附件:





报告日期: 02/18/2014
最近更新: 02/26/2014
文档编号: 6IHKTB4Y