Is it possible to use NI DAQ 6211(USB) and matlab without latency? Or how to make latency always the same?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commento
Bilgehan paray
il 9 Mar 2015
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).
Risposte (1)
Lucien Robinault
il 7 Feb 2018
Modificato: Walter Roberson
il 7 Feb 2018
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 Commento
Walter Roberson
il 7 Feb 2018
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.
Vedere anche
Categorie
Scopri di più su National Instruments Frame Grabbers in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!