From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for VC++

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous reading (width measure) with high frequency

Hi, everyone! At first, I work in VC++ with DAQPad-6020E. I have to process PWM signal in continuous mode with high sample rate (T=10ms Fr=100Hz). After all advices I began used General-Purpose CTR set of functions (ND_BUFFERED_PULSE_WIDTH_MSR) with double buffer. But it works not correct => I received data not with sample rate 100Hz. I receive only 25values/second!!!
I think that it's problem of double buffer. Maybe It cannot work with high frequency? But 100Hz isn't high, isn't it? 🙂
Can U advice me where is my problem? Maybe there is other methods to process signal? Can U send me example (c++ better;)

And another. I tried read data from DInput by Line and Port functions in the loop. => every i
teration take 4ms!!! I don't understand how read more frequently?

Sorry, my runglish 🙂
P.S. I set source ND_INTERNAL_100_KHZ, PWM input connect to ND_COUNTER_0 (PFI9)

I collect all information in file...
0 Kudos
Message 1 of 2
(2,756 Views)
Hello;

Please see
http://exchange.ni.com/servlet/Redirect?id=8505067

Regards
Filipe A.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,756 Views)