LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

measure frequency of digital random signal

Solved!
Go to solution

Hi,

   Change the type of the data queue to double, by right clicking on the constant "0" below data and choosing representation --> "dbl", do the same for the period queue as Lynn suggested. Increase the constants 10 to 1000. They should be at least twice as large as the length of your waveform, which I assume are still 10 sample points. Beyond this, you need to debug it a little. While its running, with the block diagram open, you can click on wires which will open a probe window where you can see the data that's currently going through the wire. Probe right before the zero crossing check to make sure your data is getting dequeued correctly and just after the multiplication to make sure the zero crossings are detected. Probe the array coming out the bottom of the get queue status, just below the "t" constant and see if it shows a few buffered period measurements.

 

Good luck!

0 Kudos
Message 11 of 14
(1,051 Views)

Thank you guys.. it works now.. nice to have you all

0 Kudos
Message 12 of 14
(1,046 Views)

I am not able to get this to work. My frequency is measured too high. Can someone please help?

 

 

0 Kudos
Message 13 of 14
(822 Views)

I forgot to add `dt` one last time to the signal before enqueuing. For a 100 Hz signal (0.01 sec period), this was then saying that every half period was 0.004 sec long, which is why the frequency was 125 Hz (0.5 cycles / 0.004 sec = 125 Hz). Attached is the corrected VI. (See LabVIEW Measured Frequency of Simulated Digital Signal Too High for more).

0 Kudos
Message 14 of 14
(796 Views)