Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there an NI-DAQmx analog input read function which does not read/remove data from the acquisition buffer?

When doing a continuous buffered acquisition (hardware-timed), DAQmxReadAnalogF64 and DAQmxReadAnalogScalarF64 read (and remove) data from the NI-DAQmx acquisition buffer.

 

From the same task, I would like to read one sample on demand while a buffered hardware-timed acquisition is taking place at the same time.

 

Is there a NI-DAQmx function that can return the latest acquired sample and does not interfere (remove samples) with the acquisition buffer? For example, a function which would return the latest ADC data or peeks in the acquisition buffer.

 

Thank you,

Andrei

0 Kudos
Message 1 of 2
(2,983 Views)

I don't think you can do that directly.  There are some intriguing little tricks to try with various DAQmx Read properties, but it seems that once you start venturing down that path, you'd probably get stuck doing all the read pointer management on your own. 

 

I'd suggest that you manage these special "peeks" via software.  The easiest thing is to retain the data from the most recent standard DAQmx Read somewhere and retrieve from that software storage location when there's a special request for a "peek" at recent data.

 

If the peeks require less lag time, then I'd suggest wrapping an Action Engine around the DAQmx Read call.  That'll let you store & retain important info from the different kinds of DAQmx Reads that are done, and use it to make sure your standard reads delivers a continuous lossless data stream.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 2 of 2
(2,950 Views)