03-01-2010 11:43 AM
Hello All,
I have very little experience in using DAQ mx and am having some problems setting up the following task:
Using the NI-6259 I am trying to use counter 0 to count a semi-random TTL pulse train for a pre-programmed number of pulses (max 1kHz). During this event, counter 1 will be conting pulses at a higher rate (< 10kHz). When counter 0 reaches its programmed count, counter 1 will pause and return the number of pulses counted. The cycle will then repeat.
Please, any examples or guidelines would be appreciated.
Thanks!
Chris
Solved! Go to Solution.
03-01-2010 05:42 PM
Hi Chris,
You might have gotten this through your phone support request already, but I have attached code that should get the job done.
The way the code works is to use one counter to generate pulses of N ticks wide (N is the "programmed" count that you want to measure off of). The code uses the other counter to measure the period of this pulse in terms of ticks of the 2nd source. So, when ctr0 reaches N ticks, its output will change state and ctr1 will take its measurement. Configuring the code this way will allow you to continuously repeat the measurement with 0 delay between periods.
Try the code out and be sure to let us know if you have any questions!
Best Regards,
03-02-2010 10:01 AM
Thank you, thank you!
Seems I have some learning to do re: DAQ mx.
Chris