NI-DAQmx .NET Framework 4.5 API Reference

Table of Contents

AnalogUnscaledWriter.Write Method (Boolean, UInt16[,])

  • Updated2023-02-21
  • 2 minute(s) read
AnalogUnscaledWriter.Write Method (Boolean, UInt16[,])
Writes one or more unscaled 16-bit unsigned integer samples to one or more AOChannel objects in a task.

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

Syntax

public void Write(
	bool autoStart,
	ushort[,] data
)
Public Sub Write ( 
	autoStart As Boolean,
	data As UShort(,)
)

Parameters

autoStart
Type: SystemBoolean
If set to this method automatically calls Start if you do not explicitly call it.
data
Type: SystemUInt16
A 2D array of samples to write to 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 to write to each channel. The order of the channels in the array corresponds to the order in which you add the channels to the task. The order of the lines in the array corresponds to the order in which you add the lines to the channel.

Exceptions

ExceptionCondition
DaqExceptionThe NI-DAQmx driver returned an error.
IndexOutOfRangeExceptiondata has a non-zero lower bound.

Remarks

If the task uses on-demand timing, this method returns only after the device generates all samples. If the task uses any timing type other than on-demand, this method returns immediately and does not wait for the device to generate all samples. Your application must call the WaitUntilDone method to block until the device has generated all samples.

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.

See Also

Log in to get a better experience