Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

speeding up pulse width measurement c# pci 6601

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();

 

 

 

0 Kudos
Message 1 of 2
(4,376 Views)

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

--
Peter A.
Field Sales Engineer, NI Germany
0 Kudos
Message 2 of 2
(4,350 Views)