07-31-2009 06:06 AM
Hi!
If I have to record an analogue signal of 6,000 Hz, what would be the ideal sample rate? I understand that it is necessary that the sample rate should be at least twice the highest frequency of the signal to provide accurate measurement. But how fast the sample rate can I set?
Is 1MS/s fine?
07-31-2009 07:36 AM
Sampling at the Nyquist frequency (twice the maximum frequency of your input waveform) is not sufficient for most measurement. To accurately get things such as waveform amplitude you would like at least ten times the maximum frequency of your waveform. Remember that unless your input is a pure sine wave, you have higher order components in it, so you need to sample fast enough to catch these, as well. What type of measurements are you trying to make? How accurate do these measurements need to be? Is your input waveform much different than a sine wave? Is there much noise on the signal? The answers to these questions will determine your digitizing frequency and the number of points you need to digitize.
07-31-2009 07:57 AM
You're right! I did try to use a much lower sample rate and the resolution doesn't seem correct. I have to record two signals, one of which is the crank angle of an optical encoder (very old and it has 360 ppr) and the other cylinder pressure from Kistler piezoelectric transducer.
For the crank angle signal, it has a sawtooth waveform. And it has slit/transition errors or perhaps due to eccentricity as well.
I am not sure how high a resolution I should set to get a reasonably good signal.
07-31-2009 08:07 AM
Hi Damien!
I have 2 codes. But I am not sure if it will work. I just started using LabVIEW. Therefore,I am not proficient to construct a complex code.
Could you help to take a look at it, please?
08-03-2009 07:52 AM
The max time is set very low, so unless you have a continuous trigger, it will probably timeout and give you no data. Set the max time to 10 seconds or so and it should work. The max time is how long the code waits for data before generating an error and returning nothing.
Both are also single shot pieces of code. They will execute once and be done. You will need to use a WHILE loop to get repetitive behavior. I would recommend looking at the NI-SCOPE examples in the LabVIEW Example Finde (Help»Find Examples...).
Keep at it. You will get it.