LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

time measurement on ni-9172

Hi, I want to capture internal (ni-9172) timer/counter value by sequential pressing of two buttons (both pulled up by external resistor) connected on ni-9401 module. The goal is reaction time measurement.

I know how to do this using some microcontroller, but I have no idea how control and use internal timebase of ni-9172 for this purpose.

My idea is to start counting after software command and capture state of internal free running counter by pressing external buttons. Is this possible ? I have looked on examples and the most close to my needs was  Two edge separation measurements. Unfortunately this example assumes to input complete periods on least one of input terminals.
I'm sorry for my terrible english ;-).

Thank you for your help.

CUA

 

 

 

 

 

 

 

 

 

0 Kudos
Message 1 of 4
(2,329 Views)

I re-read the manual and I think it should go to use Gate terminal of the counter to start or stop counting but still do not know how to read the value of the internal counter.

 

0 Kudos
Message 2 of 4
(2,307 Views)

Hi CUA,

 

to access the counter on your cDAQ-9172, you need to enable the internal counter.

 

You can do this by setting up the I/O name filtering (right click the I/O name constant/control):

 

and next check "Internal channels" (see attached picture):

 

Now you should be able to use the internal counter.

 

You can use the DAQmx Channel property node to set up the input terminal to timebase clock for example.

 

Probably the best solution then would be buffered reading using the digital input of your card as timing signal for reading the buffer.

 

If you have any further questions, please do not hesitate to ask!

Best regards,
Jano
0 Kudos
Message 3 of 4
(2,290 Views)

Hi Jano!

 

Thank for your help. Here is simple frequency measurement based on your suggestions.

Using two synchronized counters I can imagine the reaction test working.

 

Thx again.

CUA

 

internal_counter_ext_trigg_read.png

 

 

 

 

 

 

 

 

 

0 Kudos
Message 4 of 4
(2,276 Views)