Hi all,
I'm trying to make a VI where I read data from a NI PXI-6115 DAQ device by triggering it 150 times, building an array, and later operating on that array.
So I have a for loop nested within another. The nested for loop does the read 150 times before handing the data over to the outer loop (Please see attached file). In the screenshot, I've removed everything that processes the data and another DAQ task that does Analog output on another device but it is still slow. Also the triggering is disconnected, but still slow.
I'm trying to read 1000 samples at 10MHz each 150 times, with a 10kHz TTL external square wave trigger. Without any overhead I suppose it would be (0.2ms *150) => 30ms, but I'm getting frame times of about 300ms on a NI PXIe-8135 when reading 1000 samples and setting DAQmx read to 1000 samples per channel.
However! Everything changes when I change the number of samples in DAQmx Sample Clock and samples per channel in DAQmx Read.
|DAQmx Timing samp/chn| |DAQmx Read samples/p/chn| |Frame time|
| 1000 | | 1000 | | 300ms |
| 1024 | | 1000 | | 22ms |
| 1024 | | 1024 | | 40ms | (Why twice slower here)
| 100 | | 100 | | 165ms |
| 10 | | 10 | | 302ms | (What! Why??)
| 2048 | | 2000 | | 30ms |
| 2048 | | 2048 | | 55ms |
| 2047 | | 2000 | | 115ms |
| 2046 | | 2000 | | 95ms |
| 8192 | | 8100 | | 165ms |
I thought my hardware was maybe dying, so I tried the same thing on a PXI-8820 with a different PXI-6115 connected, similar results.
Do I have something seriously setup wrong that's causing this? Placing start task and end task within the loop doesn't change much... I really can't believe it would be so dependent on these numbers. I set up a similar loop a few years ago and don't remember having all this trouble.