LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to read my frequency more frequently?

Solved!
Go to solution

Hi,

I was hoping that i would be able to read a frequency of 50hz (=period time 20ms) with three samples if my program had a duty cycle of 60ms (or at least two). Unfortunately i can only retrieve one sample in that period.

 

I constructed a *.vi to experiment a bit with this. It views the loop time of a while loop and allows for the user to vary the number of samples, timeout, etc. As you might suspect i am a beginner, and i hope that there is a simple way to solve this that i am missing.

 

Is there a way for me to acquire/approximate more samples of the frequency input in 60ms? Do I have to use real time solutions (unavailible to me at the moment)? 

 

Any help is appreciated!

Will

0 Kudos
Message 1 of 7
(2,521 Views)

are you measuring this signal using anallog modules or else. sampling a signal need to calcualte sampling rate at which the signal should be sampled other wise the problem of aliasing will occur i.e the singal will loose the freq info and when again recontructing the signal back it cannot be recontructed to the orignal signal. the relation of signal freq and sampling is as follows;

 

 

                                   sampling freq (how frequently the signal need to be sample) > 2 times of orignal singal freq

 

this is a Nyquist criteria . so for 50Hz , 2 times of 50Hz means at lesast 100Hz sampling freq req. which means in one second 100 samples are taken. the sampling time is reciprocal of the sampling freq which tell how much time req to take single sample

0 Kudos
Message 2 of 7
(2,482 Views)

I am measuring continously through a isolation amplifier module and a NI6211 PFI port. When i measure an frequency of 50hz i can get two samples in 80seconds, three in 100 etc. In general it seems like i need n*T+40 ms, where n is the number of frequency measurements and T is 1/f. The 40 seems to be uneffected by my input frequency

0 Kudos
Message 3 of 7
(2,462 Views)

what you exactly want from measuring 50Hz freq like want to see it on some display as amplitude -- time axis. if you want to reconstruct the signal after sampling it or want some FFT on it then you need to sample it as Per Nyquist criteria

0 Kudos
Message 4 of 7
(2,420 Views)

 

Thanks for your help, I'll try to clarify:

The program should be able to measure change in frequency when loads are connected and disconnected. As it stands now i can measure analog inputs fast enough to properly study transients in voltage. But i can only sample frequency (using the Daqmx vi CI Freq) once every 60ms (if i use a 50hz input signal).

 

I just need to know how the frequency varies over time, preferably with more then 1sample per working cycle (60ms)

 

Will

0 Kudos
Message 5 of 7
(2,394 Views)

(The end result of this is a *.csv file with timestamps for all measured values: all analog channels and my frequency channel. My sampling frequency for analog input is set to 1000hz, and i can then choose how the program displays these values. One line in the csv per second as the mean of the 1000 samples, or a hundred lines that are the mean of 10 samples each etc etc. I'd like to be able to do the same for frequency).

 

0 Kudos
Message 6 of 7
(2,387 Views)
Solution
Accepted by topic author Will_Labutsikt

Hi again

 

I hadn't included the timing Vi (Implicit) and this caused the problem.

 

0 Kudos
Message 7 of 7
(2,369 Views)