I'm having an issue detecting low frequency signals with a high sampling rate. Shouldn't I be able to detect the frequencies as long as the sampling rate is at least 2 times the highest frequency I will measure? The frequency range I am measuring is 5-25 Hz, and I use Extract Single Tone.vi to measure the frequency. The sampling setting I am using is 2 samples at 10 kHz. Is there a method I can use to make this work?
Attached is the vi.
By telling the DAQmx Timing VI number of samples of 2, you are setting the buffer size to 2. You are constantly overwriting your buffer. Leave that unwired when using Continuous Acquisition. While you are at it, you probably should not be simply grabbing 2 samples. Just use -1 to get all of the samples. You also might want to throw in a wait in your loop so you aren't hammering the CPU and give enough time for the DAQ to acquire the data. If you are looking for a 5Hz signal, you need to acquire data for at least 200ms. Set the loop rate to more like 500ms.
You are sampling at 10Ks/S, but only taking two samples. What do you expect to see? If your signals are binary (On or Off) you would only see either an on or an off, or if the rise/fall time was fast and you were Extremely lucky, one of each. If you want to see a waveform you have to sample for at least the period of a waveform. So you should take samples for at least 0.2 seconds to capture an entire waveform at 5Hz, ideally longer. Think of looking at a tide change at a dock. If you want to see the entire tide change you will probably have to measure repeatedly over 24 hours, not just run out on the dock, measure the height twice and leave. That wouldn't tell you anything other than at that precise moment the tide height was X, but not that it was at high tide, low tide, in between, etc.
I type too slowly, I see that a more technical answer has been given, so mine will be the philosophical one!
In addition to the advice you have already been given, Extract Single Tone.vi uses FFT internally. The FFT may not work well unless it has 3-5 cycles of data and 10 or more are better. So a second's worth of samples is probably about the minimum you should use for good results.