Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Need Help to estimate time for counting edges of analog square wave

Dear fellow labview users,

 

I am building a DC magnetic motor and I have integrated a hall effect sensor to count the frequency of the motor. 

Due to the limited number of 'counter' channel in my USB 6211, I decided to use an analog input channel to retrieve the

signal from the hall effect sensor. 

Thus far, I have managed to count the edges (falling) of the analog square wave. I intended to estimate time needed to complete

one square wave cycle and calculate the frequency. I know such approach may not be as accurate as the 'counting edge/frequency' using

the counter channel but this is necessary as I wanted to use the analog input channel for the measurement. 

 

I need some advice/help to get the time and complete the routine for calculating the frequency of the motor. 

I have attached some info for references. 

Thanks a lot guys..

 

Alam

0 Kudos
Message 1 of 5
(5,973 Views)

1. Why bother change boolean to 0/1 when you can use boolean directly?
2. Should use unsigned integer for counting instead of double precision for better performance.
3. Should try with real system to see how noise effects, and threshold level may need to adjust accordingly.

0 Kudos
Message 2 of 5
(5,946 Views)

Thanks for the advice.

The data was based on a real system.

 

Anyway, I am still looking for the most suitable way to do this. Thanks again.

0 Kudos
Message 3 of 5
(5,942 Views)

FYI...solved it!!!

 

0 Kudos
Message 4 of 5
(5,891 Views)

hello,

I have trouble finding how to start and stop the timer using external voltage or current pulse. we are interfacing a circuit to labview. so for that we need to count the time it takes between the two external voltages.

hope you can help.

0 Kudos
Message 5 of 5
(5,802 Views)