01-08-2010 08:14 AM
Hello
I am using a wave generator to simulate a 200 Hz wave and a NI acquisition board is used to acquire the signal.
I think that according to Nyquist theorem, I must, at least, acquire at 2x the frequency of the wave.
Thus, I'm acquiring, in continuous samples, at 1000Hz. I checked for different number of samples and only 20 seemed ok for wave reconstitution in excel.
When I try to acquire two waves simultaneously, (both 200 HZ) I can't seem to manage...
I'm not very confident with acquiring at high frequency...
Hope someone can help me
I attached my vi
Thanks in advance
Solved! Go to Solution.
01-08-2010 08:46 AM
01-08-2010 08:57 AM
Hi,
When you said that you can't seem to manage, what did you mean? Did you have an error? Did you buffer overflow? Some questions and comments that I have.
1. What kind of hardware do you have? We need to know the capability of the hardware.
2. In the code, you are doing a continuous acquisition at 2k for 2 channels, 2000 samples/s/channel. You set the number of samples to read as 200. That means you will read 200 samples at every loop count. What worries me is that you have a lot of analysis code in the acquisition loop. If the analysis code slow down the loop enough, you can have a buffer overflow. One thing that you can try is to do two parallel loops, one for acquisition and one for analysis. From the acquisition loop, you can queue the data onto a queue structure and dequeue the data in the analysis loop.
Yik
01-08-2010 09:07 AM
Hello
First of all, I would like to thank for your reply
I can't open your file, because I'm using LV8.5 and your version is 9....
Could place a pic of the code you sent me?
Thanks again
01-08-2010 09:13 AM
Hello Yik
Thanks for the reply.
When I said that I didn't manage i was referring to reconstruct the wave in excel file...
The code I sent, I tried many combinations of acquisition freq and number of samples...2kHz and 200 samples results weren't able to reconstruct the wave.
I'm using a NI USB 6211, 16 bit, 250kS/s
I'll erase analysis for now and try it.
Thanks for the help
01-08-2010 09:13 AM
Here is what I did:
01-08-2010 09:23 AM
01-08-2010 10:07 AM
Hello aestet
I just reproduce your code, but I wasn't enable to reconstruct the wave in excel. I only get few poits per second. I used 1000Hz, 400samples
Attached is lvm file. I think my problem, aside from code, is the relation between samples and acq frequency and the way that I write it to lvm
The bad thing is that i'm lost and can't figure out a solution
Again, thanks for your help. It was very valuable
01-08-2010 10:10 AM
01-08-2010 10:16 AM
Hi Dennis
Could you be more specific?
I figured that the code was wrong, otherwise I won't be here. Note that 400 samples and 2000Hz was one of the attempts to reconstruct both waves.
I can say that only one chanel acquiring a single wave of 200Hz was reconstructed with 20 samples and 1000Hz acq frequency. Luck? maybe.
when I try to acquire 2 waves, I couldn't reconstruct any of them because I don't have enough data (samples/s) in the lvm file.
If you could help me I would apreciate that.
What do you mean with "and then throwing away all of the timing information and all but one sample. "
Thanks