Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx 6221 frequency/period measurement

Hi,
 
We are trying to replace an older (non-NI) ISA board with the 6221 board in our standard products line.
 
We have a home-grown Win32 driver for the ISA board, required to implement (on that hardware) the counter input algorithm we have to use, which has these basic qualities:
 
1) Gets a running count of ticks value, must be perfect.
2) Gets the period/frequency of each tick (low count encoders, 30-120 PPR) - time-between-edges measurement mode.
 
So, now we have to implement something on the 6221, with DAQmx, which I think we can do, but I would sure appreciate any information an NI rep could provide.
 
Specifically, I need to know if the data from DAQmxCreateCIFreqChan() or DAQmxCreateCIPeriodChan() is guaranteed to return a sample for each incoming tick, when used in continuous acquisition mode.  (Which would let me have my tick count, plus the period/frequency for each tick).
 
If not, that is OK, IF: I can get the latest inter-edge period from one counter, and by running the signal into the 2nd counter input, the tick-count, in a coherent read (can do GetTicks,GetHz,GetTicks [,GetHz,GetTicks]... until 1st and 2nd GetTicks are equal).
 
What I can not deal with is if the data from DAQmxCreateCIFreqChan() or DAQmxCreateCIPeriodChan() is based on some arbitrary number of incoming ticks.
 
Thanks for any help,
Joe
0 Kudos
Message 1 of 3
(3,941 Views)
Period and frequency measurement will return a data point for each rising edge (or falling, depending on how you set the starting edge) of the incoming signal.  So you can infer the number of edges that have occurred by counting the number of samples acquired.  Even still it may be of benefit to you to use a second counter to count the edges that have occurred that's up to you though, either way will work.
 
gus....
0 Kudos
Message 2 of 3
(3,927 Views)

Gus,

Thanks, that's the exact answer I was looking for.

Joe

0 Kudos
Message 3 of 3
(3,925 Views)