NI-DAQmx .NET Framework 4.5 API Reference

DigitalMultiChannelReader.EndReadMultiSamplePortByte Method

  • Updated2023-02-21
  • 2 minute(s) read
DigitalMultiChannelReader.EndReadMultiSamplePortByte Method
Handles the end of an asynchronous read initiated with BeginReadMultiSamplePortByte(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 byte[,] EndReadMultiSamplePortByte(
	IAsyncResult asyncResult
)
Public Function EndReadMultiSamplePortByte ( 
	asyncResult As IAsyncResult
) As Byte(,)

Parameters

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

Return Value

Type: Byte
A 2D array of 8-bit unsigned integer samples from the task. 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 channel. 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 BeginReadMultiSamplePortByte(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 EndReadMultiSamplePortByte(IAsyncResult) before the asynchronous read represented by the provided IAsyncResult is complete, EndReadMultiSamplePortByte(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