05-29-2009 07:20 AM
Hi,
I try to measure the pulse width of an digital signal with a pci 6601 counter. It works fine but it ist too slow. (3 values per second). In a Measurement and Automation Studio Task a equal measurement worksy pretty fast. Could you help me to configure my counter channels for higher speeds (more values per second).
my code:
myTask.CIChannels.CreatePulseWidthChannel("Dev1/ctr0", "", 0.000001, 0.1, CIPulseWidthStartingEdge.Rising, CIPulseWidthUnits.Ticks);
CounterReader counterInReader = new CounterReader(myTask.Stream);
time = counterInReader.ReadSingleSampleDouble();
06-02-2009 07:55 AM
Hi programmator,
have you taken a look at the examples shipped with Measurement Studio or NI-DAQmx?
You should be able to find these files at %Documents and Settings%\All Users\documents\National Instruments\NI-DAQ\Examples\DotNET2.0\Counter\Measure Period or Pulse Width\MeasPulseWidth\cs
In this example a callback-function is used to read the acquired data asynchronously.
Do you still observe performance issues using this example?
Best regards,
Peter