LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

pulse counting with voltage input

Im using compact field points  analog I/O (AI-112) to measure the frequnecy of an anamometer.
Basically the sensor is just a switch that open/closes at a frequency which gives 1 pulse per second (1Hz = 1.25MPH).
I know the pulse counter I/O would be best for this, but I assume labview with realtime should be able
to handle this measurment. Im having trouble finding the right VI's to do the job. Any suggestions for
possible ways to count the pulses/ measure the frequncy would be appreciated.
 
0 Kudos
Message 1 of 2
(2,763 Views)
Hello cfpboy,

I have a question about your signal first.  How long does your signal remain changed when a pulse occurs?  Does the signal stay "high" for 1 full second and then go "low" or does it pulse "high" once a second and then immediately return to "low".  If it stays "high", then you could simply poll the input in a LabVIEW Loop set to occur once a second.  You could then store the value in a shift register, and compare the current value to the previous value.  If they are different, then the state has changed, and you could then increment your software counter.  As you are using an analog input module, you will want to convert your voltage level to a "digital state" by checking if it is above or below a specified level.

One drawback of this approach is long term phase shifting as well as the possibility of reading while in a transition state.  This could potentially throw off your measurements.  As you are using LabVIEW Real Time, you can slightly mitigate some of these problems by utilizing a LabVIEW Timed Loop instead of a normal Loop.


0 Kudos
Message 2 of 2
(2,721 Views)