Quantcast
Channel: Counter/Timer topics
Viewing all articles
Browse latest Browse all 1250

Measure time between rising edges of two analog signals

$
0
0

I am trying to measure the elapsed time between rising edges of 2 analog signals, in real-time using DAQmx and a PCIe DAQ card.

 

The two-edge separation function of a counter can do this very easily but this built-in function is only for pulse (digital) signals.


My signals are analog. How can I do this with DAQmx? I have tried doing this:
1. Set up two counters to produce single digital pulse each
2. Each pulse is triggered by each analog signal, on the rising slope and at certain voltage level
3. Thus I will have two pulses whose rising edges are apart from each other by the same amount of time as the original analog signals
4. I will then use a 3rd counter and use the two-edge separation function to measure the time difference between the two pulses.

 

The above cannot work since the pulse generation cannot be triggered by an analog signal...it can only be done with a digital trigger, and according to the DAQ card's manual, the trigger can only come from PFI0.

 

If I use the simple two-edge separation function, can I instead just connect analog signals to PFI lines and use the function directly? Will it work? Is it possible to connect analog signals to PFI lines directly and use the counter's two-edse separation measurement which is supposed to be only for digital signals?


Viewing all articles
Browse latest Browse all 1250

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>