04-08-2014 09:09 AM
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
Solved! Go to Solution.
04-09-2014 12:51 PM
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
04-10-2014 02:03 AM
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
04-11-2014 10:47 AM
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
04-14-2014 01:18 AM
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
04-14-2014 01:54 AM
(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).
04-15-2014 02:10 AM
Hi again
I hadn't included the timing Vi (Implicit) and this caused the problem.