08-11-2011 07:10 AM
I am attempting to measure a long pulse with a counter on an PCI-MIO-16E-1 board (30 seconds). How do I change the counter from the 20MHz clock to the 100 kHz clock? Also, how can I monitor the counter progress and display it to the user?
08-12-2011 04:14 PM
Hi Dan,
There are examples on how to do pulse measurements installed with the DAQmx driver. You can find these examples if you navigate through your Start Menu and go to All Programs » National Instruments » NI-DAQ » Text-based Support » .NET 3.5 Examples » Counter. Within this folder you can find which example best applies to your situation and build off it.
The DAQmx function you are looking for to use the 100kHz clock is the CIChannel.CounterTimebaseSource Property.
Hope that helps!
Allie
08-16-2011 11:39 PM
Thanks for the information. I believe I have the timebase working properly now. However, it is not clear to me how to monitor the pulsewidth measurement while the counter is counting. I have used this in the past with NI-DAQ (using GPCTR_Watch) to insure that the counter is progressing properly. I have reviewed the examples and it appears that the MeasurementCallback function uses the following code to obtain the results once the counter has stopped: myCounterReader.EndReadSingleSampleDouble(ar).
How would I monitor it during the pulsewidth measurement?
Thanks.
08-18-2011 03:45 PM
Hi Dan,
Are you using DAQmx or the Traditional DAQ driver? If you are using the DAQmx driver, unfortunately there is not a function that is equivalent to GPCTR_Watch. You may try CIChannel.Count It is supposed to indicates the current value of the count register.
Allie