LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Determining Analog Signal Frequency with Prebuilt VIs

Don't know what is wrong with this code.  Am trying to determine the frequency of a signal from an analog signal (paddlewheel flowmeter).  As a starting point, I'm using a simulated square wave with the "Timing and Transition Measurements" VI and am getting following error:

~~~~~~~~
Error -20308 occurred at Timing and Transition Measurements -> frequency_determination_example.vi
:3"  (waveform index 0 of 1)

Possible reason(s):

Analysis:  The waveform did not cross the mid reference level enough times to perform this measurement. Check the signal length, reference levels, and ref level units.
~~~~~~~~~

However, there seems to not be any options in the "Timing and Transition Measurements" VI to set mid reference levels.

Any insight into why this simple problem is occuring would be appreciated.  Attached is my program's simple code.

-tsippel

0 Kudos
Message 1 of 3
(2,810 Views)
I can't look at your VI but what is the frequency you are generating? You need at least 2 pulses for the function to work. Connect a graph indicator on the output of the simulated square wave. You can experiment with the various sampling info parameteres. You can decrease the sample rate or increase the number of samples.
 
p.s. You can right click on the express VI and select Open Front Panel. This will convert it to a regular VI. The reference levels are a constant but if you want, you can change it to a control.
0 Kudos
Message 2 of 3
(2,808 Views)
Hi,

Dennis was right (without looking at the code). You generate one (1) square wave, if you had generated 1000 sampled you'd get the correct answer.

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 3 of 3
(2,799 Views)