Multifunction DAQ

Showing results for 
Search instead for 
Did you mean: 

Hot to Access Multichannel DAQ Data

Hello All,

I have kinda asked a similar question before but am still a little confused.

I have a system that is using 16 channels and on each channel I am sampling 32768 points here is my first function I call

DAQmxCreateAIVoltageChan(taskHandle, "Dev1/ai0:15", "",DAQmx_Val_RSE, -5.0, +5.0, DAQmx_Val_Volts, NULL )

then when I am ready I call

DAQmxReadAnalogF64( taskHandle, NoToRead, DAQmx_Val_WaitInfinitely, DAQmx_Val_GroupByChannel, dData, NoToRead * MaxChannels, pNoRead, NULL );

dData is my Single dimensional array that the data is read into. My question is when I call DAQmxReadAnalogF64 are all 16 channels each having 32768 points being written into this array? So is my array (16 * 32768) ???


0 Kudos
Message 1 of 2
That is correct.  The DAQmxRead function will return an array that has the size (Number of channels in the scan list * numSampsPerChan input parameter).  So your array will be 16*32768 elements.  Keep in mind that with the value DAQmx_Val_GroupByChannel for the fillMode input, the first 32768 elements (0 through 32767) will be channel 0, and elements 32768 - 65535 will be channel 1, and so on.
-Alan A.
0 Kudos
Message 2 of 2