NI-DAQmx .NET Framework 4.0 API Reference

Table of Contents

DigitalMultiChannelReader.BeginMemoryOptimizedReadMultiSamplePortInt32 Method (Int32, AsyncCallback, Object, Int32[,], ReallocationPolicy)

  • Updated2023-02-21
  • 2 minute(s) read
DigitalMultiChannelReader.BeginMemoryOptimizedReadMultiSamplePortInt32 Method (Int32, AsyncCallback, Object, Int32[,], ReallocationPolicy)
Begins an asynchronous read of one or more 32-bit integer samples from one or more DIChannel objects in a task.

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

Syntax

public IAsyncResult BeginMemoryOptimizedReadMultiSamplePortInt32(
	int samplesPerChannel,
	AsyncCallback callback,
	Object state,
	int[,] data,
	ReallocationPolicy policy
)
Public Function BeginMemoryOptimizedReadMultiSamplePortInt32 ( 
	samplesPerChannel As Integer,
	callback As AsyncCallback,
	state As Object,
	data As Integer(,),
	policy As ReallocationPolicy
) As IAsyncResult

Parameters

samplesPerChannel
Type: SystemInt32
The number of samples to read. If you set samplesPerChannel to -1 for a continuous acquisition, the read retrieves all samples available in the buffer at the time of the read. If you set samplesPerChannel to -1 for a finite acquisition, the read behavior is set by the ReadAllAvailableSamples property of the DaqStream you are reading from.
callback
Type: SystemAsyncCallback
An optional asynchronous callback that is called when the read is complete. Specify if you do not want a callback when the read is complete.
state
Type: SystemObject
A user-provided object that distinguishes this asynchronous read request from other requests. Use this parameter to provide information to the callback. Specify if you do not need to pass any additional information to the callback.
data
Type: SystemInt32
An initialized 2D array of one or more 32-bit integer samples that contains the read data. 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 of the channels. 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.
policy
Type: NationalInstruments.DAQmxReallocationPolicy
Dictates the reallocation behavior of the read operation. Refer to ReallocationPolicy for more information.

Return Value

Type: IAsyncResult

See Also

Log in to get a better experience