I am programming an application in C# with DAQmx 7.4 on Windows XP with an NI 6036E Multifunction DAQ.
I am acquiring a substantial number (about 100) of short multichannel bursts (8 channels with 100 to 1000 samples per channel) at a sample rate of 20 Ksamples per second per channel. After setting up the Task accordingly and with FiniteSample collection and no sort of triggering, I run this basic code:
AnalogUnscaledReader reader = new AnalogUnscaledReader(task.Stream);
reader.SynchronizingObject = null;
short[][,] data = new short[this.numberOfBursts][,];
for (int i = 0; i < this.numberOfBursts; i++) {
data[i] = reader.ReadInt16(this.samplesPerChannel);
}
I have determined that the time taken for consecutive reads is almost always a multiple of 10 msec (did this by using a ramp input waveform and analyzing the jumps in the acquired data). That is to say, if the data length of each read is, say, 4 msec, then there will be a delay of 6 msec between reads. Or, if the data length is 12 msec, there will be a delay of 8 msec.
If find this to be true whether I run the code in a console app, in a Windows Form app, in the app main thread, in a separate thread, with or without a SynchronizingObject, etc. I would like to be free of this hidden 10 msec timer that seems to be clocking everything, because I would like to shorten the turnaround delay between reads.
I've tried changing the DaqStream ReadWaitMode from its default setting of SLEEP, as well as explicitly starting and stopping the task, etc. But the modifications either don't execute or have no effect.
Can anyone advise?