问题标签 [data-acquisition]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
2 回答
1090 浏览

python - PyVISA 缺少方法

我正在使用 numpy/scipy/ipython 运行 Win 7 x64、NI 488.2、PyVISA 1.5 和 python。我正在尝试通过 GPIB-USB 连接联系 Keithley 仪器并发送简单命令。但是,当我尝试创建仪器对象时,我发现 PyVISA 的 ResourceManager 缺少用于查找、读取和写入仪器所需的方法。

按照 PyVISA 页面上的示例代码,现在我有:

它返回 get_instrument 不存在的错误。使用 tab-completion 查看资源管理器 rm 中可用的内容。表明它实际上缺少它应该具有的所有方法,仅包含 rm.init、rm.close 和其他一些方法。这些要么什么都不做,要么返回一个 4099L。尝试调用 rm 本身只会打印字符串“ResourceManager()”。

经进一步检查,visa.VisaLibrary() 无处可寻,表明问题是安装拙劣;但是,在重新下载并重新安装整个软件包(使用 pip)时,丢失文件的问题仍然存在。签证模块本身加载良好,只是缺少大部分重要文件。我搞砸了安装,还是有其他事情发生?

0 投票
0 回答
282 浏览

matlab - Matlab 数据采集工具箱测试数据

我正在使用 Matlab 的数据采集工具箱与 National Instruments ADC 连接。不幸的是,我只能在一天中的有限时间访问实验室中的硬件,但我希望能够在无法访问时开发和测试我的代码。有谁知道我可以收集一些样本数据,然后从文件而不是从实际硬件将其输入 DAQ 工具箱的方法?它需要随着时间的推移输入,就像使用 NI 硬件一样。

当前代码:

0 投票
0 回答
631 浏览

virtual-machine - 在 Windows 7 虚拟机中运行 NI-DAQmx ANSI C 示例时出错

我正在使用 VirtualBox 运行带有 Ubuntu 14 主机的 Windows 7 来宾系统,并且在使用 NI-DAQmx 的 ANSI C API 运行 National Instruments 提供的最简单示例时遇到了问题。

第一次打开 DAQ 设备电源时,我可以运行一次测量,之后,任何其他测量都会显示以下错误消息:

为了能够开始新的测量,我必须重新启动 DAQ 设备,可能是为了清除任何被覆盖的内部缓冲区。

我有兴趣使用回调函数运行基本的连续电压测量。(NI提供的ContAcq_IntClk示例)

完全相同的配置,相同版本的 NI-DAQmx(9.7.5),在 Visual Studio 2012 上运行,在直接运行 Windows 7 的机器上运行流畅。

我怀疑问题在于内部缓冲区由于与虚拟机的连接而被搞砸了,但无法找到一个优雅的解决方案来修复它。

我使用的设备是 NI USB-6289。


固定的:

VirtualBox 似乎与 NI USB 设备存在兼容性问题。它似乎有效,但它是不可预测的。VMWare 工作得更好。切换到 VMWare Player,现在可以完美运行。

0 投票
1 回答
329 浏览

c# - C#断点,选帧kinect v2

我正在使用 sdk 2,sample face basic。(C# 编程)我想插入一个断点或只流动预定数量的帧,或者使用预定帧作为图像来分析它。我在哪里以及如何获取代码来执行此操作?我在获取帧功能,但我不知道如何影响要处理的帧。

我想提取某个特定框架的一个特定特征。

感谢你的回复!

0 投票
1 回答
109 浏览

c++ - 从其区域估计高斯高度

我们(我和我的同事)得到了一个设备,它每秒向我们发送大量的离散整数数据(强度),这些数据往往具有高斯分布。这些伪高斯一个一个地流动,我们应该尽可能快地从每个高斯的中心选择最大的强度。此外,这些数据包含噪声,因此我们不能说每个高斯可以分成两个单调部分 => 我们不能依赖简单的事实,即如果数据开始下降,我们会找到最大值。

我的同事想出了一个主意:

  • 引入强度阈值以将高斯彼此分开
  • 将每个高斯的强度相加以估计其面积,然后估计其高度

但问题是,我怎样才能从它的区域快速估计这个伪高斯的高度?

更新:

更清楚地说,我得到的强度表示高斯的“函数值”,或者表示直方图箱的高度。

0 投票
1 回答
463 浏览

matlab - Matlab 数据采集,PCI 卡被错误地检测为 PXI 机箱卡

在 Matlab 2014b、2014a、2013b、2013a 中(不使用 simulink)

Windows7 64位基于会话的数据采集工具箱

使用 NI-DAQmx 14.1 和 NI-DAQmx 14.0

我有一块 PCI 卡被错误地检测为存在于 PXI 机箱中。这会导致以下操作失败,因为它们错误地引用了不存在的 PXI 机箱卡,而不是我实际安装的 PCI 卡。

obj.startBackground(), obj.startForeground(), 两者都会产生错误。例如:

该模块位于 PXI 机箱 4294967295 的插槽 4294967295 中。

有人可以建议解决方案吗?这是 daqsupport 的输出, 它也是它生成的文本文件(尽管上面的信息大多是多余的)。

请注意,全新安装 64 位 windows7 会发生这种情况。

0 投票
1 回答
770 浏览

c# - Adlink PCI-7250 事件回调

我刚刚编写了一个简单的 C#,以便在任何数字输入变高时从 PCI-7250(数据采集卡)获取事件回调。这是我的代码:

运行时,它只是在运行时不断抛出一些随机数,然后最终崩溃。我相信它与 EventType (DASK.DBEvent) 有关。我浏览了手册,但没有提及更多关于 DASK.DBEvent .

请指教。

0 投票
1 回答
1161 浏览

python - How to separate data acquisition, processing, and visualization properly in Python?

I am working on a project, where I want to perform data acquisition, data processing and GUI visualization (using pyqt with pyqtgraph) all in Python. Each of the parts is in principle implemented, but the different parts are not well separated, which makes it difficult to benchmark and improve performance. So the question is:

Is there a good way to handle large amounts of data between different parts of a software?

I think of something like the following scenario:

  • Acquisition: get data from some device(s) and store them in some data container that can be accessed from somewhere else. (This part should be able to run without the processing and visualization part. This part is time critical, as I don't want to loose data points!)
  • Processing: take data from the data container, process it, and store the results in another data container. (Also this part should be able to run without the GUI and with a delay after the acquisition (e.g. process data that I recorded last week).)
  • GUI/visualization: Take acquired and processed data from container and visualize it.
  • save data: I want to be able to store/stream certain parts of the data to disk.

When I say "large amounts of data", I mean that I get arrays with approximately 2 million data points (16bit) per second that need to be processed and possibly also stored.

Is there any framework for Python that I can use to handle this large amount of data properly? Maybe in form of a data-server that I can connect to.

0 投票
0 回答
81 浏览

python - Getting high sampling rates in my Matlab experiment

Just a short description of what I am trying to achieve: I have a horizontally mounted lever with a potentiometer that is used to control a cursor on a computer screen. I use Matlab 2011a with Psychtoolbox and Data Acquisition Toolbox on a Windows XP machine for this. The DAQ is an Agilent U2300 A. After many different approaches I ended up with this (example code):

This is working. I also included a time check so this while loop isn't running as fast as the CPU allows. It is limited to around 200 loops per second and I get the same number of samples. But actually these are not distinct samples. If I check for distinct samples, I get around 15 different samples per second so 15 Hz, which is not sufficient enough for a smooth movement of the cursor on the screen. I also tried using the command getSample which ended up giving me the same results.

I hope that I am doing something wrong and someone knows how to do it differently. I would also be open to recommendations for different approaches with different languages (preferably Python) and maybe even different DAQ hardware.

0 投票
2 回答
862 浏览

c# - 我应该在追加写入之间保持打开文件处理程序吗?

我正在从事一个涉及数据采集的项目。一个非常重要的必要条件是这样描述的:

  1. 在开始录制时,必须创建一个文件,并且必须写入其标题;
  2. 一旦数据采集开始,应用程序应该定期将收集到的数据保存到文件中(通常每秒一次);
  3. 写入包括将数据块附加到文件中,如果可能的话,以原子方式;
  4. 如果发生任何错误(程序错误、电源故障),文件必须保持有效,直到错误前的最后一次写入。

所以我打算用一些Thread来观察接收到的数据并写这个数据做文件,但是我不知道哪种做法最好(下面的代码不是真实的,只是为了感受一下):

第一种选择:单开

第二种选择:多开:

该应用程序应该在客户端机器上工作,其他进程的文件访问不应该是一个问题。我最担心的是:

  1. 做多次打开/关闭影响性能(注意典型的写入间隔是每秒一次);
  2. 在发生故障(包括明确的电源故障)时,哪一个最能确保文件完整性安全?
  3. 这些形式中的任何一种被认为是一种特别好的或坏的做法,还是可以根据手头问题的具体情况使用其中一种?