02-13-2007 02:06 AM
02-14-2007 02:46 AM
02-14-2007 03:26 AM
Thanks for your reply, Jaime.
Nevertheless, the paper you point me to shows labview data, and I guess that using measurement studio the results would differ of those presented in this paper.
The hardware I'm currently testing is a 4 GHz / 2Gb dual processor computer with an NI 6023E and all I need is to be able to read a 100Hz square wave to later on display the result on screen using another dedicated thread that coninuously renders the result using Direct-X technology (the fastest I know of).
Maybe I was wrong assuming that the internal clock in the NI board would take care of not losing any sample, or just a few, provided that the command to start the next read is issued right next to the read from the stream containing the measures read in the previous call, like in the following snippet:
abytMeasures = mobjTask.Stream.ReadRaw(mintSamples
);mobjAnalogInReader.BeginReadMultiSample(mintSamples, mobjAnalogCallback,
null);Okay. The code might be interrupted in between the two sentences, thus adding some delay I could cope with, but the results suggest that there is more software than hardware involved in the operation, and that would explain the slowliness I observe. Probably I was wrong thinking that the BeginReadMultiSample command was the responsible for triggering the start of the read operation entirely relying on the NI board internal processor and timer, leading to a closer to null overhead for the computer CPU.
Maybe reading one sample at a time and triggering the read operation through a software clock would be a better approach to accomplish my goal?
02-15-2007 06:12 PM
How many samples are you reading at a time on the host PC?
Using an PCI-6221 M series board I am able to sample 6 channels at 10 kHz if I only perform a read 10 times a second (i.e. 1000 samples per read).
The code segments are:
myTask
.Timing.ConfigureSampleClock("", 10000, SampleClockActiveEdge.Rising, SampleQuantityMode.ContinuousSamples, 1000);myReader =
new NationalInstruments.DAQmx.AnalogMultiChannelReader(myTask.Stream);daqmxReader.BeginReadMultiSample(1000, dataReadyHandler,
null);I find this works fine on a P4 2.4 GHz PC with Windows XP, 1 GB ram. However if I try to do too much GUI updating or plot all the samples the GUI response is not able to handle it.
02-16-2007 01:49 AM
Hi,
There is a difference because from I understand from Jordi he wants to acquire single points. That is one point each iteration. Then this should be somek ind of software timed where the program controls the acquisition. And in that case it depends of how much code/programming u got after the acquisition to determine how fast u can go (your rate depends of the time the code/PC takes from one point acquisition to the next one).
As u said if u perform a continous buffered operation you take blocks from memory and the maximum rate is determined by the ADC converter of the board. Then your maximum rate is specified by your DAQ board,