03-25-2010 03:14 AM
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.
Solved! Go to Solution.
03-26-2010 10:34 AM
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) :
Good Luck!
Regards,
04-13-2010 02:21 AM
Thank you.
I used your example and it is very good.
I solved the problem.
07-09-2011 12:39 AM
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
07-11-2011 03:23 PM
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.