NI-DAQmx .NET Framework 4.0 API Reference

Table of Contents

DigitalSingleChannelReader.EndReadSingleSamplePortUInt16 Method

  • Updated2023-02-21
  • 1 minute(s) read
DigitalSingleChannelReader.EndReadSingleSamplePortUInt16 Method
Handles the end of an asynchronous read initiated with BeginReadSingleSamplePortUInt16(AsyncCallback, Object) and retrieves the read samples.

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

Syntax

public ushort EndReadSingleSamplePortUInt16(
	IAsyncResult asyncResult
)
Public Function EndReadSingleSamplePortUInt16 ( 
	asyncResult As IAsyncResult
) As UShort

Parameters

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

Return Value

Type: UInt16
A 16-bit unsigned integer sample from the task.

Exceptions

ExceptionCondition
ArgumentExceptionasyncResult is or is not an instance of IAsyncResult returned from a call to BeginReadMultiSample(Int32, 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 EndReadSingleSamplePortUInt16(IAsyncResult) before the asynchronous read represented by the provided IAsyncResult is complete, EndReadSingleSamplePortUInt16(IAsyncResult) waits for the read to complete before returning.

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