Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

I need to get Time (microsecond level) when Rising edge / falling Edge of counter occur.

Greetings!
 
I am developing an automation for getting the exact time difference when two sensor was activated. i used the oscilloscope and my typical values of time difference varies from 0.020millisecond to 1.2 millisecond.
 
i need to get data for at least 10,000+ samples and needs to record it in an excel fileor text file, hence im am looking forward to the power of LABVIEW in measurement automation. each sample has time difference of around 4 seconds.
 
hope you guys can help me on the approach or if you have encountered this before and you have build a VI, hope you can share it. appreciate it very much!
 
Thanks,
Alex
 
 
0 Kudos
Message 1 of 3
(4,071 Views)
Alex,

Can you be a bit more specific?

What types of sensors are you reading from?

I want to make sure I understand you correctly, so please correct me if I am wrong.  You have two sensors which will change voltage when they sense something.  You want to know the exact time between when the first sensor changed its voltage and the second sensor changed its voltage.  And you would like to have at least 10 kSamples recording the entire thing.

Do you always know which sensor will be activated first?  If so, you can setup your VI to trigger its acquisition when sensor 1 reaches a prespecified voltage level and then takes as many samples as you need to record the reading from the second sensor.  You would want to use a reference trigger.

There is a good shipping example which demonstrates how to use the reference trigger.

Acq&Graph Voltage-Ext Clk-Analog Ref.vi

This example VI is perfect, except that it uses an external clock.  I would change the clock to internal from the front panel.

Once you have all of the readings inside of the computer, you can use post processing to determine the time between sensor activation.

I hope this helps,
Lorne Hengst
Application Engineer
National Instruments
Message 2 of 3
(4,052 Views)

Alex,

What hardware are you using?  Are your sensor signals good clean 5 volt logic (TTL)?

This sounds to me like a natural place to perform a buffered two-edge separation measurement, but only if the same sensor always fires first and you know which one it is.  As far as I know this type of measurement requires either an M-series multi-function board or a dedicated 660x counter/timer board.

Look for shipping examples or examples here on ni.com to get started.  Post back if still stuck.

-Kevin P.

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 3 of 3
(4,049 Views)