LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

High speed time difference between digital pulses

Highlighted

I am having trouble designing a VI to do what I need. I am trying to find the time difference between two digital pulses on two separate channels but the VI that I currently have only has a precision of more than a millisecond. I needs it to be under 0.1 ms.

Exactly what I am doing:

I have two optical sensors that give a digital pulse on two separate channels when an object passes by them. They are separated by a known distance (about 8 inches) and I am passing an object by them at a relatively high velocity (about 17 feet/sec). I need to use the time difference between them to find an exact velocity. The input is normally high and becomes low when an object interupts the field. I need the time difference between the falling edges and it needs to be within 0.1 ms.

My equipment:

M Series 6250 PCI DAQ

BNC 2120 connector block

I suspect that I need to use LabVIEW realtime but I am not familiar with it. If anyone can think of a good way to do this or even has a VI that I can take a look at then it would be very helpful.

 

0 Kudos
Message 1 of 9
(1,420 Views)
Highlighted

I've only got seconds to reply now, but you should look into examples for "two signal edge separation" measurements using one of the on-board counter/timers.  You can easily get sub-microsecond resolution!

-Kevin P.

0 Kudos
Message 2 of 9
(1,416 Views)
Highlighted
I believe that "two signal edge separation" requires that the digital edges be on the same channel. The digital edges that I have are on two separate channels.
0 Kudos
Message 3 of 9
(1,414 Views)
Highlighted
Can you hook up an external logic device such as a set reset flipflop and measure the period of that? This essentialy combines your two signals into one which has all the required information.

Lynn
0 Kudos
Message 4 of 9
(1,396 Views)
Highlighted

Two-edge separation measures 2 different signals coming in on 2 different pins, but only 1 counter "channel" is used to perform the measurement.  The M-series allow very flexible signal routing, so you can very likely map almost any physical PFI pin to almost any functional counter usage (timebase, sample clock, gate, trigger).

-Kevin P.

0 Kudos
Message 5 of 9
(1,394 Views)
Highlighted

Thanks Kevin,

That does exactly what I need.

0 Kudos
Message 6 of 9
(1,389 Views)
Highlighted
How do I assign PFI inputs other than the defaults to the counter?
0 Kudos
Message 7 of 9
(1,372 Views)
Highlighted
You can do that (and a whole lot more) using the DAQmx property nodes.  In this case, it'd be a DAQmx Channel property node.  I've attached a screenshot.

-Kevin P.
0 Kudos
Message 8 of 9
(1,366 Views)
Highlighted
Can the "two edge seperation" measure the time difference between two ANALOG inputs?
0 Kudos
Message 9 of 9
(986 Views)