NI-DAQmx .NET Framework 4.5 API Reference

AnalogSingleChannelReader.EndReadMultiSample Method

  • Updated2023-02-21
  • 2 minute(s) read
AnalogSingleChannelReader.EndReadMultiSample Method
Handles the end of an asynchronous read initiated with BeginReadMultiSample(Int32, AsyncCallback, Object) and retrieves the read samples.

Namespace:  NationalInstruments.DAQmx
Assembly:  NationalInstruments.DAQmx (in NationalInstruments.DAQmx.dll) Version: 20.7.45.49302

Syntax

public virtual double[] EndReadMultiSample(
	IAsyncResult asyncResult
)
Public Overridable Function EndReadMultiSample ( 
	asyncResult As IAsyncResult
) As Double()

Parameters

asyncResult
Type: SystemIAsyncResult
An IAsyncResult that represents an asynchronous call started by calling BeginReadMultiSample(Int32, AsyncCallback, Object).

Return Value

Type: Double
A 1D array of floating-point samples from the task. Each element in the array corresponds to a sample from the channel.

Exceptions

ExceptionCondition
ArgumentExceptionasyncResult is or is not an instance of IAsyncResult returned from a call to BeginReadMultiSample(Int32, AsyncCallback, Object) .
OutOfMemoryExceptionThere is not enough memory to carry out this operation.
DaqExceptionThe NI-DAQmx driver returned an error during the asynchronous operation.

Remarks

If you call EndReadMultiSample(IAsyncResult) before the asynchronous read represented by the provided IAsyncResult is complete, EndReadMultiSample(IAsyncResult) 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.

Note Note
Refer to Asynchronous Reads and Writes for additional information.

See Also

Log in to get a better experience