Begins an asynchronous read of a single 8-bit unsigned integer sample from one or more DIChannel objects in a task.

Syntax

Namespace: NationalInstruments.DAQmx

public IAsyncResult BeginReadSingleSamplePortByte(AsyncCallback callback, object state)

Remarks

To get the read data or any exceptions that occurred during an asynchronous read initiated with BeginReadSingleSamplePortByte(AsyncCallback, object), call EndReadSingleSamplePortByte(IAsyncResult) with the returned IAsyncResult.

Use this method for devices with up to eight lines per port.

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

Refer to Asynchronous Reads and Writes for additional information.

Asynchronous Reads and Writes

Parameters

NameTypeDescription
callbackAsyncCallback

An optional asynchronous callback that is called when the read is complete. Specify null if you do not want a callback when the read is complete.

stateobject

A user-provided object that distinguishes this asynchronous read request from other requests. Use this parameter to provide information to the callback. Specify null if you do not need to pass any additional information to the callback.

Returns

An IAsyncResult that represents the asynchronous call.