11-28-2018 06:51 PM
Hello,
I have USB NI-6351, and it is stated in the manual that the sampling rate is 1.25 MS/s and the update rate is 2.85 MS/s. For some reason, the while or for loops in the VI that I write are way slower than the sampling rate, and I cannot figure a way to make the loops faster. I need faster loops to be able to use the DAQ to control 9 fans in real time. Is there any way to achieve that?
Thanks,
Adnmak
11-29-2018 07:59 AM
Well, there's much to unpack.
1. Real-time control and USB are a bad combo.
2. For that matter, real-time control and Windows aren't such a great combo either
3. The quoted sample rates are based on an assumption of hardware-timed buffered data acq. It sounds like you're trying to do 1 sample per iteration and then iterate your loop at MHz rates.
Buffered data acq gets you higher throughput but will also increase your latency. Control loops aren't too fond of latency either.
4. It's unlikely your fans have a physical response bandwidth that approaches MHz (or even kHz).
Due to USB latency, Windows timing limitations, and physical fan response bandwidth, I'd recommend you start with a goal closer to a 100 Hz control loop. You stand a chance of accomplishing that with USB and Windows, and such a rate also stands a chance of being "fast enough" to keep the fans in "good enough" control.
-Kevin P
11-30-2018 04:15 AM
For a even number of fans I would had a multicopter in mind... but even than the loop time doesn't need to be 1µs
😄
A 3x3 array of fans for a wind tunnel project?