Is it possible to use NI DAQ 6211(USB) and matlab without latency? Or how to make latency always the same?

3 次查看(过去 30 天)
The idea is to use NI USB DAQ 6211 with Simulink in real time. The delay between input and output is variable and depends on the frequency of the input signal. Is it possible to limit the delay to a constant and small value? Every idea is welcome.
  1 个评论
Bilgehan paray
Bilgehan paray 2015-3-9
Hi; Can you elaborate more what you intend to do please?
I think there is about 3ms latency when using Matlab. If you use C, it was about 700us. (calling outputSingleScan function).

请先登录,再进行评论。

回答(1 个)

Lucien Robinault
Lucien Robinault 2018-2-7
编辑:Walter Roberson 2018-2-7
Hello,
You can use the event, DataAvailable, putting a listener whom will call one function to manage input then call another one for ouput.
Changing the default values from the parameter NotifyWhenDataAvailableExceeds, and NotifyWhenDataAvailableExceedsAuto, to really small value while increasing the acquisition frequency should give you a decent result.
The following exemple is a really good sum up. And to get a pretty reactive output as Bilgehan paray said you can just use outputSingleScan from a different session from the one you use for input.
  1 个评论
Walter Roberson
Walter Roberson 2018-2-7
This does not appear to be relevant. This solution is for use with MATLAB, not for use with Simulink Real-time, which requires everything to be coded in Simulink blocks. I have not cross-checked the references but I would be surprised if these functions from DAQ toolbox are available in MATLAB Function Block.
The answer to the question for the MATLAB level is No, MATLAB itself operates as a process on host operating systems that do not offer hard real time guarantees. Simulink Real-time on the other hand is run by a real time kernel on a dedicated system and so has more opportunities to provide hard real time guarantees.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Analog Devices ADALM1000 Support from Data Acquisition Toolbox 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by