NI-DAQmx .NET Framework 4.5 API Reference

DigitalSingleChannelReader.MemoryOptimizedReadSingleSampleMultiLine Method

  • Updated2023-02-21
  • 2 minute(s) read
DigitalSingleChannelReader.MemoryOptimizedReadSingleSampleMultiLine Method
Reads a single Boolean sample from a single DIChannel in a task. The channel can contain multiple digital lines.

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

Syntax

public bool[] MemoryOptimizedReadSingleSampleMultiLine(
	bool[] data
)
Public Function MemoryOptimizedReadSingleSampleMultiLine ( 
	data As Boolean()
) As Boolean()

Parameters

data
Type: SystemBoolean
An initialized 1D array of Boolean samples that contains the read data. Each element in the array corresponds to a digital line in the channel.

Return Value

Type: Boolean
A 1D array of Boolean samples from the task. Each element of the array corresponds to a digital line in the channel.

Exceptions

ExceptionCondition
ArgumentExceptionIf data is or is uninitialized.
DaqExceptionThe NI-DAQmx driver returned an error.
OutOfMemoryExceptionThere is not enough memory to carry out this operation.

Remarks

If the data buffer is large enough to hold the number of samples requested, this overload attempts to reuse existing memory allocated from the array to acquire data. This results in more efficient memory allocation when performing multiple reads with a continuous digital input task.

NI-DAQmx scales the returned data to the units of the measurement, including any custom scaling you apply to the channel. You specify these units with the create channel methods or the DAQ Assistant.

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 NI-DAQmx Readers and Writers for more information about memory limitations in NI-DAQmx read methods.

See Also

Log in to get a better experience