NI-DAQmx .NET Framework 4.0 API Reference

Table of Contents

AnalogMultiChannelWriter.WriteWaveform(TData) Method

  • Updated2023-02-21
  • 2 minute(s) read
AnalogMultiChannelWriter.WriteWaveform(TData) Method
Writes one or more analog waveform samples to one or more AOChannel objects in a task.

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

Syntax

public void WriteWaveform<TData>(
	bool autoStart,
	AnalogWaveform<TData>[] data
)
Public Sub WriteWaveform(Of TData) ( 
	autoStart As Boolean,
	data As AnalogWaveform(Of TData)()
)

Parameters

autoStart
Type: SystemBoolean
If you set autoStart to , WriteWaveform automatically calls Start if you do not explicitly call Start. You cannot set this parameter to if you have installed events on the task.
data
Type: NationalInstrumentsAnalogWaveformTData
A 1D array of AnalogWaveformTData objects to write to the task. Each element in the array corresponds to a channel in the task. 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 analog waveform corresponds to the order in which you add the lines to the channel.

Type Parameters

TData
The type of the analog waveform samples.

Exceptions

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

Remarks

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

Analog waveform writes are not affected by the SampleInterval or StartTime properties on AnalogWaveformTData. To configure timing for analog waveform writes, use the ConfigureSampleClock(String, Double, SampleClockActiveEdge, SampleQuantityMode, Int32) method.

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