LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

High speed time difference between digital pulses

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
(3,120 Views)

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.

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 2 of 9
(3,116 Views)
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
(3,114 Views)
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
(3,096 Views)

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.

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 5 of 9
(3,094 Views)

Thanks Kevin,

That does exactly what I need.

0 Kudos
Message 6 of 9
(3,089 Views)
How do I assign PFI inputs other than the defaults to the counter?
0 Kudos
Message 7 of 9
(3,072 Views)
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.
CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 8 of 9
(3,066 Views)
Can the "two edge seperation" measure the time difference between two ANALOG inputs?
0 Kudos
Message 9 of 9
(2,686 Views)