LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

frequency measurement for ELVIS

Solved!
Go to solution

I am using Elvis and I want to measure the frequency of an analog input signal.
I am using this program I found in a manual form NI.

I am using LABVIEW 8.0.

The problem is that the program is not reading the frequency.No mather the frequency I try to read it always reads r=the same thing.

I have attacheted the program below.

0 Kudos
Message 1 of 5
(2,824 Views)
Solution
Accepted by topic author Americanu22

Americanu22,

 

A couple things you'll want to consider:

 

1.  To ensure frequency information is correct you need to be sampling at 2*[Highest Frequency in Your Signal].

 

2.  You may want to consider a continious acquisition with a setup like this(This example can be found in Help»Example Finder under Hardware Input and Output»DAQmx»Analog Measurements) :

Cont_Acq&Graph_Voltage-Int_Clk.vi_Block_Diagram_-2010-03-26_10.30.26.png Good Luck!

 

Regards,
Dustin D

Message 2 of 5
(2,798 Views)

Thank you.

I used your example and it is very good.

I solved the problem.

0 Kudos
Message 3 of 5
(2,759 Views)

hi dustin ,

i was wondering if u could help me with a problem i have.

 

i have signals from 2 sources , one from a rotating shaft that give me one pulse for every rotation of the shaft and an other signal from an other sensor on an other shaft that gives me i pulse for every degeree rotation of the shaft . my vi is intended to check the 2nd sensor which is supposed to give me 1 pulse per degree. to do that i want to measure the exact number of pulses given by the second sensor ( the one that give one pulse per degree) between two pulses from the first sensor ( the one that gives one pulse for evey complete rotation) does labview have any predefined vi that can accomplish this taks or how else can i accomplish this task, please demonstrate if possible.

 

i use a PCI MOI 16E 1 daq card and labview 8.5 version

 

Many thanks in advance

John  

0 Kudos
Message 4 of 5
(2,500 Views)

You can follow Dustin's example and build on it to have each encoder run in parallel, and a block of code in the loop for the slow counter that reads from a shared resource like a local variable or semaphore. Setup this shared resource to increment in each loop of the fast coutner. In the slow counter loop, you can reset the shared resource count so that the current value is only the fast counter events since the last slow counter event. Be sure to use a locking shared resource if you write to the variable in both loops, if you use a plain local variable then you can experience a race condition.

- Regards,

Beutlich
0 Kudos
Message 5 of 5
(2,463 Views)