Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-6014 time measurement

Hello,

I'm using NI-6014 card to measure and process three analog inputs and that is working fine.
But now i have two additional devices giving me two pulses. Time between this two pulses is cca 0.0001 sec. and i need to measure this time with accuracy about 0.000001 to satisfy my needs. i use first digital input as trigger start on PFI0. i knew that i need to use counter....... but some how i get stacked. i tried with some examples from labVIEW but results are stochastic.

i will graceful for any help or idea

regards

Mario
0 Kudos
Message 1 of 5
(4,429 Views)

Hello Mario,

 

It sounds to me like you need to perform a two-edge separation counter measurement task.  There is a developer zone article titled 'Two-Signal Edge-Separation with DAQ-STC Counter in DAQmx' that gives a good explanation of this type of counter input task, and has a LabVIEW code example.

 

Best wishes,

Wallace F.

National Instruments
Applications Engineer
0 Kudos
Message 2 of 5
(4,416 Views)

Hello,

 

thanks, I realize that. I already make some hw with optocouplers and TTL or to put booth signals on one input line. Today I'll try this,

 

Mario

0 Kudos
Message 3 of 5
(4,410 Views)

Hello again

This is my situation with signals

 

 sig1       _______|^^^^^|_________________________________

 sig2       ________________________________|^^^^^^|________

 

time                      |<---------  time I need ---------->|

 

 

Two edges separation is not giving me time which I need. Any other ideas. It has to be simple. Something like first signal start counter and second stop counter and read number of counts?

 

regards

Mario

 PS

I apologize if my question is stupid but I'm old fashion programmer (assembler, modula, ...) and this type of programming languages is little bit confusing for me.

 

 

0 Kudos
Message 4 of 5
(4,394 Views)

Hi Mario,

 

I took a second look at that developer zone article, and I can see that it doesn't measure the time between rising edges.  I also searched for an example program that does count the time between rising edges, and I believe I found one. Please refer to the linked knowledgebase article which contains the example code.  The knowledgebase article specifies the NI counter/timer boards, but it will work with your 6014 multifunction DAQ board as well.  All you should need to do is specify the following parameters:

1. Physical Counter

2. Start Trigger Terminal

3. Stop Trigger Terminal

4. Timebase Terminal

 

To convert the results to time, you will need to divide the number of ticks between start and stop triggers by the frequency of the timebase. I hope this works better for you

than the last one.

 

Regards,

Wallace F.

National Instruments
Applications Engineer
0 Kudos
Message 5 of 5
(4,366 Views)