Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing samples read with multi channel AI


Quick question regarding the samples read from the DAQ when using a range of channels. I understand when reading one channel at a time, Dev1/ai0, and accessing the array of samples. What if I wanted to read multiple channels, Dev1/ai4:6. How is this stored? When using the same functions: CreateAIVoltageChan, CfgSampClkTiming, StartTask, ReadAnalogF64 how am I to access each N samples for each channel? I read where it possibly stores in a 2d array but have not had much luck figuring out how to proceed with that in the functions. Thanks

0 Kudos
Message 1 of 3
(2,928 Views)

It looks like you are dealing with C++.  I'm not familiar with using DAQmx in C++, but I think this will be the same as in LabVIEW.

 

When getting multiple samples from multiple channels, the result is a 2D array.  I want to say that the row is indexed by the channel and the column is the sample number.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 3
(2,924 Views)

Yes, forgot to mention I am working in CVI. But needless to say, I managed to get it working. Thanks for the input.

0 Kudos
Message 3 of 3
(2,921 Views)