09-03-2012 11:11 AM
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
09-05-2012 08:07 AM
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.
09-07-2012 03:26 AM
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!
09-11-2012 09:47 AM
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