Showing results for 
Search instead for 
Did you mean: 

Reading digital input signal and finding gap width with out a clock?

Hey I've been trying to make a vi that can find the time it takes between a falling edge and a rising edge. So far this is what I have come up with but it seems to give a minimum time differance of 5ms. Is there a way to fix this without using a second clock. 


Here is a plot about what I'm talking about:


this should give me a time between clicks of about .00001s not 5ms.

I'm usinging a NI myDAQ.

I have also attached the Vi if you want to take a look.





0 Kudos
Message 1 of 4

First, stop using the "Run Continuously button."


Next think "Data Flow"  Your second loop cannot start till you press "Stop" and the boolean input to the second loop must be TRUE so, the loop runs once.

"Should be" isn't "Is" -Jay
0 Kudos
Message 2 of 4

So I havent been using the run continuously button. It should be set up to work just using run and still generate a contiuos pulse train.

0 Kudos
Message 3 of 4

Here is the code functioning as intended at lower frequencies.(the right half of the plot was run with those settings)

pic #2.png

0 Kudos
Message 4 of 4