Type: SystemInt32
The actual number of samples per channel read. This is useful when the reading operation yields fewer samples than the actual length of data.
Return Value
Type: UInt16
A 2D array of 16-bit unsigned integer
samples that contains the read data. Each element in the first dimension of the array corresponds to a channel in the task. Each element in the second dimension of the array corresponds to a sample from each of the channels. The order of the channels in the array corresponds to the order in which you add the channels to the task or to the order of the channels you specify in
ChannelsToRead.
Exceptions
Exception
Condition
ArgumentException
If data is or is uninitialized;
If the first dimension of data does not match the number of channels;
If ReallocationPolicy is not ToGrow, and data is not capable of holding the required number of samples; or
The NI-DAQmx driver returned an error during the asynchronous operation.
OutOfMemoryException
There is not enough memory to carry out this operation.
Remarks
If you call
this method
before the asynchronous read
IAsyncResult
is complete,
it
waits for the read to complete before returning.
NI-DAQmx scales the returned data to the units of the measurement, including any custom scaling you apply to the channel. You specify these units with the create channel methods or the
DAQ Assistant.
NI-DAQmx read and write methods time out after the amount of time specified by the
Timeout
property on the task you are reading from or writing to.