LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Receiving two digital pulse trains and measure time between pulses

Hi.
I have DAQmx-6259 and I am interested in how to receive two
simultaneous digital pulse trains, each with about 70kHz.
These pulse trains are slightly out of phase compared to eachother.
And I need to measure the time between the rising edges.

I would like to do something like this:
- Trig on counter1. Get a timestamp.
- Trig on counter2. Get a timestamp.
Compare times.

But, I can't see how to do this.
I can't have two simultaneous DAQmx tasks running at the same time.
And the only way to let the counters cooperate is to use a quadrature
measurement. But then I can't extract the time between the pulses,
only which direction the pulses go (degrees on a rotary encoder for
example).

But I only need the time between my pulses, can this be done?
Or does anyone have any good ideas to help me out here?
Help is appreciated. Thanx!
0 Kudos
Message 1 of 5
(2,926 Views)

One work around:

 

Connect the signal to 2 Digital inputs and implement the edge detection in operation in the software.  So your logic will do the following:

 

1. Initiate two free running timers for two lines

2. Poll for rising edges

3. When rising edges appear in any of the DI lines then latch the time for that line and when a rising edge occurs for 2nd line compute the differance between the 1st line and 2line timers initiated for two counters.

 

But is this card resided in PC or RT.  because this applicaiton needs micro second timer.  If you want to achive this with PCI card and Windows its not possible [Windows can support only ms timer which will not suit to this application]

Message Edited by JK1 on 05-27-2009 05:16 AM
With regards,
JK
(Certified LabVIEW Developer)
Give Kudos for Good Answers, and Mark it a solution if your problem is solved.
0 Kudos
Message 2 of 5
(2,920 Views)
Ok, I think I have found it, Two edge separation. 🙂
0 Kudos
Message 3 of 5
(2,906 Views)

I am trying to do something similar, decode an anemometer / weather vane, I have two pulse trains, both are fairly slow - in the region of 5-30hz

 

I need to measure the period between upgoing edges of the first signal

I also need to then measure the time difference between the upgoing edge of the first signal and the next upgoing edge of the second signal (2 edge separation)

 

I want to do this with either digital or analogue input (NOT using a counter)

 

I am struggling, any ideas?

 

Thanks

0 Kudos
Message 4 of 5
(2,708 Views)

Hi Folks, i know its been a long time since this topic was talked on. does the owner have a .vi he could post?????

 

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