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
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
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
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 Center および File 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!