02-23-2017 02:49 AM - edited 02-23-2017 02:50 AM
Hello people,
i know this topic has been extensively answered on this forum and but after spending day i still can't make it happen.
I am acquiring a sinusoid at a sampling rate of 20 Khz, with 2Khz samples per channel. For test, i have a sine signal with frequency 500Hz. This means i have a peak every 40 points.
With this i can see that i have 50 peaks per second ( which makes sense since i have 2000 samples per second).
Now when i try to export this into a text file, i could export my sine signal as expected, but for peaks i only get 50 peaks no matter how long i record.
Any help would be much appreciated.
Thanks in advance
02-23-2017 04:00 AM
If you attach your VI or project, you might get some help. Otherwise people cannot see your code.
02-23-2017 04:11 AM - edited 02-23-2017 04:13 AM
zezendapuss wrote:I am acquiring a sinusoid at a sampling rate of 20 Khz, with 2Khz samples per channel. For test, i have a sine signal with frequency 500Hz. This means i have a peak every 40 points.
With this i can see that i have 50 peaks per second ( which makes sense since i have 2000 samples per second).
Let's clean up some terminology first. You have a sample rate of 20kS/s. Each time you read the buffer, you read 2kS. So each iteration is 100ms. So you are detecting 50 peaks/iteration, which makes sense (500Hz•0.1s=50).
Now as to your problem, my guess is that you are overwriting your file each iteration. But without code, that is a complete guess.
02-27-2017 04:35 AM
Here is the vi i have been using. I could plot the peaks in the graph but still cant figure out how to export these peaks in a txt file.