LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

voltage measurements

Hi,

I have used bot the ideas like basic average DC rms it is not making any effect also the other like filtering out at low pass 10hz it is giving me error

error message 20020 and says"the cut of frequency, fc, must meet : 0<=fc<=fs/2

 

I have not been able to resolve the error I tried all options availble on the VI like IIR or FIR -- have look at my VI I am extracting waveform form from read VI

Thanks

0 Kudos
Message 11 of 16
(1,171 Views)
I don't know what kind of DAQ board you are using, and chances are that I won't be familiar with it anyway.  But some DAQ boards can take a number of readings in a specified time period, like 10 readings per second.  Read your DAQ literature to see if this can be done.  You have to set somthing like number of samples (10) and sample rate (100mS).  If your DAQ can only take one reading at a time, you could put the code to read in a for loop and execute it 10 times.  Put a delay in the loop to cause it to read at a certain sample rate (100 millisecond delay).  The output of the for loop will be an array of 10 measurements if you enable indexing on the loop output terminal (which is already enabled by default).
- tbob

Inventor of the WORM Global
Message 12 of 16
(1,165 Views)
The error message is saying that the cut off frequency must be between 0 and your sample rate (fs) divided by 2.  I am not familiar with DAQMX and I could not find where the sample rate is defined in your vi.  To use a cut off frequency of 10Hz, your sample rate would have to be at least 20Hz (20 samples per second).  Sorry I can't help any further.  Look at the DAQ literature to see how to set the sample rate.
- tbob

Inventor of the WORM Global
Message 13 of 16
(1,163 Views)
That error is based on the Nyquist criterion for sampled data. If means that the cutoff frequency of your filter (fc) must be less than half the sampling frequency. If your sampling period is 100 ms as tbob suggested earlier then your sampling frequency is fs = 1/100 ms = 10 Hz. With that sampling rate you would need to set fc < 5Hz.

Lynn
Message 14 of 16
(1,161 Views)
tmdar,
 
You have not specified which DAQ device you are using (I am going to assume E-Series, M-Series, or S-Series), however I have modified your vi such that it will take advantage of the timing engine on your device to collect samples at a rate at which you specify.  Basically the way that this VI will work, is that you will specify a rate to acquire data at, and a number of samples to read.  The DAQ board will acquire samples at the rate you specify, and each iteration through the loop, the number of samples you specify will be read, filtering applied and averaging done.  Take a look at my attached example, and see that will do the trick for you.
 
Hope this helps,
Dan
0 Kudos
Message 15 of 16
(1,153 Views)

Hi,

Mr Mcdan your modifications has played perfectly and solved my problems, infact by only taking mean of the reading gives me almost same what i get after filtering slighly changed but it is perfect and I am getting good data Thanks once again

I am also thankful to Mr Tbob and Johnsold for helping me out too and it was nice discussion and suggestions from learning point of view

Thanks all

0 Kudos
Message 16 of 16
(1,149 Views)