LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does the waveform chart doesn't work at low sample rate and with few channels?

Hello!
I wrote an application using LabVIEW 8.0 and DAQ6024E card. The programm reads n  analog voltage samples (n= sample rate/5)  every 0.2 sec.  And the voltage values are displayed in a waveform chart during the measurement. At the same time, the voltage values are saved in a spreadsheet file.  After the measurement, the spreadsheet file is read, and the complete curve is displayed in a XY-Diagram. 
When I run the program at 100 samples/sec and measure 16 channels, the wavefrom chart displays the curve immediately after the program starts, and the display updates smoothly.  The timing of the measurement is correct too. But if I reduce the sample rate (for example to 10 samples/s)  OR reduce the number of channels(for example only 2 channels are measured), the voltage values are displayed on the waveform chart after a quite long time (more than 3 sec), and the chart is not updating smoothly anymore. I don't understand why my program doesn't work at low sample rate and with fewer channels ?
Anybody can help?  Thanks a lot!   

Message Edited by molo511 on 11-19-2006 08:24 AM

0 Kudos
Message 1 of 14
(3,924 Views)
What happens if you replace the timing loop with a regular while loop?
0 Kudos
Message 2 of 14
(3,907 Views)
Hi Bill!
i tried out the regular while loop. The problems are still there with regular while loop.
0 Kudos
Message 3 of 14
(3,874 Views)
I tried the LabVIEW 8.0 examples Acq&Graph voltage-Int Clk.vi and Acq&Graph voltage-Int Clk-timed loop.vi,  they have the same problems as I mentioned before. Is there something wrong with the AI Read (analog 1D Waveform, N channels N samples)?
0 Kudos
Message 4 of 14
(3,853 Views)
I can't view your VI because I don't have 8.0 but I did an example in 7.1 that uses DAQmx that I think is setup the way you described it. With this example, I don't a difference when the sample rate or channel count is changed. It sounds like you are using traditional DAQ. Is there some specific reason for using that? The traditional DAQ should work in a similar matter but DAQmx is what NI is supporting now and in the future.
Message 5 of 14
(3,843 Views)
Hello Dennis,
thanks a lot for your reply. The program you attached is exactly the same as my program. (I am using the DAQmx functions and a DAQ6024E card.)
I tried your code out just now, the measurement for one channel  is running properly, if the sample rate is 10000Hz. But if I reduce the sample rate to 100 Hz and sample only one channel, I get a error message on my laptop(Error -200284 at DAQmx Analog 1D Wfm NChannel N Sample).  Similar like my program, if I run the program with 2 channels and at 10Hz (or 100Hz), the chart is not updated immediately after the program runs. It seems the chart waits first for several seconds and then display curve.
It seems that the program runs well when the sample rate is high. Since I need to write a program which can support 10-500Hz sample rate and 1- 16 channels, I want to make it clear, why it doesn't work at low sample rate and with few channels.
Can you try 100Hz (or 10Hz) with only one channel on your PC? If it is running properly on your PC, maybe I have to check my laptop and DAQ card. Thanks a lot!

Message Edited by molo511 on 11-22-2006 04:13 PM

0 Kudos
Message 6 of 14
(3,833 Views)
I did run at those rates but since I don't have a DAQ board on my desktop pc, I'm running in simuation mode. That may be part of the difference. What happens if you change the period of your timed loop? Does the error go away?
Message 7 of 14
(3,825 Views)
I got the same error even I increase the period of the timed loop to 1000ms(only one channel is measured at 100Hz sample rate). It seems that the AI Read function inside the timed loop (or while loop) gets a time out when the sample rate is low or when only few channels  are measured.
0 Kudos
Message 8 of 14
(3,813 Views)
__
0 Kudos
Message 9 of 14
(3,778 Views)
...
0 Kudos
Message 10 of 14
(3,763 Views)