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

We appreciate your patience as we improve our online experience.

Multifunction DAQ

Showing results for 
Search instead for 
Did you mean: 

Read voltage and process realtime.

I have a PCI-6251 DAQ card and the DAQ Documentation and SW Combo kit.
I would like to write a Visual C++ program to read an analog voltage and process that voltage realtime.
I noticed the function DAQmxReadAnalogF64.  But it seams that I can only process the readArray after it is filled.
How do I read one analog input sample?  So that I can process it immediately.
0 Kudos
Message 1 of 3

Why don't you just use 1 for the numSampsPerChan?   I have to warn you though if you do that you won't be able to run at very fast rates in your application.



Message 2 of 3

Hi Kevin,

Just to add to Stuart's suggestion, please take a look at the DAQmx C examples that install with the driver located at C:\Program Files\National Instruments\NI-DAQ\Examples\DAQmx ANSI C on your computer.  In particular, navigate to Analog In >> Measure Slow Varying Signal >> One Sample. 




Message 3 of 3