LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

frequency counter

Solved!
Go to solution

Hi, i am newbie to labview and i want to simulate an universal counter in labview, so i have 2 generated waveforms(DBL) , one to comand the counter and one to be analysed. I have in my vi a selector for the gate time(wich i have conected to a Get waveform subset bloc ,one for each signal) and a selector for the function(freqvency, period or freq1/freq2) of the counter that i want to build.

 How can i compare the 2 generated waveforms to get the period or freqvency of the analysed signal?    

If anyone have an example or some advices pls reply(i am using labview 8.6)

 

Thanks

0 Kudos
Message 1 of 15
(4,574 Views)
Is it possible to post what you have done?
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
Message 2 of 15
(4,564 Views)

i didnt put the function selection yet because i dont know where to conect it yet.

thanks

0 Kudos
Message 3 of 15
(4,546 Views)

You can get frequency from a waveform by using the Extract Single Tone Information.vi found in the palette Waveform - Analog Waveform - Measurements.  Also found in Signal Processing  - Wfm Measure.  You will also find other functions here pertaining to waveforms such as Pulse Measurement and Amplitude & Level.

 

- tbob

Inventor of the WORM Global
Message 4 of 15
(4,545 Views)
thanks for reply but i dont need to measure the freq i need to build a block where to calculate the freq like a real universal counter does. i know the value of the freq because the user set it up 🙂
0 Kudos
Message 5 of 15
(4,531 Views)

I don't understand the difference.  Your vi outputs a waveform.  The measure function performs FFT on the waveform to calculate the frequency.  Please explain what you mean about "calculate the frequency like a real universal counter does."  You want to measure the cycle time and calculate the frequency from that?

 

 

- tbob

Inventor of the WORM Global
Message 6 of 15
(4,522 Views)
here i made a simple schematics for what i want to do.

i want to compare the signals and find out how many periods fits in one period of the other signal(the comand signal)

Thanks for ur time

0 Kudos
Message 7 of 15
(4,511 Views)
Solution
Accepted by topic author sebee

That is more clear.  You want a pulse count.  You have already captured the waveform.  You need to count the number of rising edges.  You will need to use Get Waveform Components and get the Y values in an array.  Feed the array into a loop with indexing enabled.  Count the number of times the voltage swings from the low threshold to the high threshold.  To do this, you will need to store the previous value and compare it to the current value for each loop iteration.  Or you can count the number of midpoint crossings in the positive direction to get the number of pulses.  How good are you with Labview?  Is this something you can handle or take a stab at?  Try to learn by doing it yourself.

 

- tbob

Inventor of the WORM Global
Message 8 of 15
(4,493 Views)

thanks tbob that is the solution but i am not so good with labview or what i am trying to do, so even u explayned what i have to do i didnt get it right:(

 

i got the Y component i conected it to a loop(for or while? that is placed in the ''big'' while loop)with auto-indexing enabled and to store the prev value i used shift registers. I compared the Y values but i didnt get any farther with the solution.

Pls help me finish this and thanks again.

0 Kudos
Message 9 of 15
(4,440 Views)

I will come up with a solution, but it will be much later this afternoon if you can wait.  Maybe someone else could fill in.

 

- tbob

Inventor of the WORM Global
0 Kudos
Message 10 of 15
(4,416 Views)