LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read frequency input to digital

Hi,

 

I have an LED sensor in a system to catch the blinking of an LED, it works, but the sensor sends the signal in frequency, I used a frequency filter to get the response in a waveform graph; now I can see the three blink in the waveform, but I want to be able to get something like just a number of blinkings to compare the number of blinks and send that to teststand and teststand will evaluate the response; the problem is that I tried to convert the waveform to a digital array, and then count the rising edges to get the number of blinks, but it didn't work, because the pulse are formed of a specific frequency (as in the attached image, sorry the system where I'm doing the test does not have internet), so when running my code I was counting like 2000 rising edges; do you have any ideas how to overcome this problem, because when watching the signal from the outside I see the 3 blinks, but when I go deeper I realize that signal is actually a frequency and not a countinous "1"

 

Hope anyone can help and thanks in advance

 

Regards

Alejandro Rodriguez

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

Hi Alejandro,

 

What hardware are you using? You can catch the "blinking of an LED" by hooking it up with the digital I/O of your acquisition hardware. This way it will read the ON and OFF state of LED as digital pulses. Now to count the rising edge, just use "boolean crossing" which will give you the pulse count.

 

Another crucial thing you need to make sure is the tested DIO frequency of your hardware. For example if the maximum frequency the digital I/O can handle is 10Mhz, it means that the duration between ON (rising edge), OFF and then back ON (second rising edge) of LED can be max 100 nanoseconds. 

 

Here's a small code. LED blink is simulated here. 

 

Count.png

 

 

 


0 Kudos
Message 2 of 3
(2,741 Views)

Thanks for the answer, but I found a different solution, I add small counter everytime I was detecting the logical "0", and it reset with a logical "1", so I was seeing complete logical "1" as long as there weren't 50 continuos logical "0"s

 

But thank you for the answer, I thought about that when I was sleeping

 

Regards

0 Kudos
Message 3 of 3
(2,709 Views)