04-20-2018 02:26 PM
Hello all,
I'm using a usb 6001 to measure voltage and identify peaks in measurement. I have a few questions regarding both peak detection and the data aquisition part:
1. Using the "waveform peak detection" subVI i see there is a location node, Under its description it gives the following formula for location in time "Time[i]=t_0+dt*Location[i]". But i don't know what is my "dt" is it dictated by the daq or the program running it? I would very much appreciate a simple example for when using the usb6001 with the daq assistant and for when i use let's say a "simulate signal" of a sin function with said frequency, Samples per sec and number of samples. In both cases what dictates the "dt".
2. As mentioned i use the 6001 to measure and log peaks in voltage. However i noticed that whether i define it to run continuously or for N samples and in both cases change the samples per sec and/or number of samples it affects the number of peaks that the program recognizes!
Im using the daq assistant to read the data in a loop and my question is: should i define it as run continuously or N times and why? and in both cases what should i set the #of samples and samples per seconds to (and why).
P.S the peaks vary in reality from a few peaks per second to 150 peaks per second (maximum) so i know the device should be able to easily read them. (the peaks' lengths are sufficient for the daq to read aswell)
Thanks in advance,
John
Solved! Go to Solution.
04-20-2018 05:15 PM
When you sample something at a particular frequency, say "SF", this means that you take a sample every 1/SF = "dt" seconds. If you are using DAQmx and are outputting your sample as the Data Structure that LabVIEW calls a Waveform, it will contain not only your array of points ("Y") but also the Sampling interval, dt. Changing SF changes dt (they are reciprocals of each other).
The question of what sampling rate to use depends on what question you are asking, and with what precision you want the answer. You need to understand what you are measuring. For example, if you want to ask about the peak price of IBM Stock during the day, you may want to get the Stock Price every minute, or hour. If you want to know when a sound waveform reaches its peak, you'll want a SF several times the highest frequency you expect in the sound (i.e. multiple KHz), or a dt < 0.001.
Bob Schor