BeginReadSingleSamplePortByte(AsyncCallback, object)
- Updated2026-02-05
- 1 minute(s) read
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.
Refer to Asynchronous Reads and Writes for additional information.
Asynchronous Reads and Writes
Parameters
| Name | Type | Description |
|---|---|---|
| callback | AsyncCallback | 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. |
| state | object | 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.