NI-DAQmx .NET Framework 4.0 API Reference

Content Type
Programming Language
Current manual
Table of Contents
Product DocumentationNI-DAQmx .NET Framework 4.0 API ReferenceCounterMultiChannelReader.EndReadSingleSampleUInt32 MethodCurrent page
Table of Contents

CounterMultiChannelReader.EndReadSingleSampleUInt32 Method

CounterMultiChannelReader.EndReadSingleSampleUInt32 Method

CounterMultiChannelReaderEndReadSingleSampleUInt32 Method

Handles the end of an asynchronous read initiated with BeginReadSingleSampleUInt32(AsyncCallback, Object) and retrieves the read sample.

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

Syntax

public uint[] EndReadSingleSampleUInt32(
	IAsyncResult asyncResult
)
Public Function EndReadSingleSampleUInt32 ( 
	asyncResult As IAsyncResult
) As UInteger()

Parameters

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

Return Value

Type: UInt32
A 1D array of UInt32 samples from the task. Each element in the array corresponds to a channel in the task. 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

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

Remarks

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

Was this information helpful?