NI-DAQmx .NET Framework 4.5 API Reference

DigitalMultiChannelWriter.BeginWriteWaveform Method

  • Updated2023-02-21
  • 2 minute(s) read
DigitalMultiChannelWriter.BeginWriteWaveform Method
Begins an asynchronous write of one or more digital waveform samples to one or more DOChannel objects in a task.

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

Syntax

public IAsyncResult BeginWriteWaveform(
	bool autoStart,
	DigitalWaveform[] data,
	AsyncCallback callback,
	Object state
)
Public Function BeginWriteWaveform ( 
	autoStart As Boolean,
	data As DigitalWaveform(),
	callback As AsyncCallback,
	state As Object
) As IAsyncResult

Parameters

autoStart
Type: SystemBoolean
If set to this method automatically calls Start if you do not explicitly call it. You cannot set this parameter to if you have installed events on the task.
data
Type: NationalInstrumentsDigitalWaveform
A 1D array of DigitalWaveform 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 digital waveform corresponds to the order in which you add the lines to the channel.
callback
Type: SystemAsyncCallback
An optional asynchronous callback that is called when the write is complete. Specify if you do not want a callback when the write is complete.
state
Type: SystemObject
A user-provided object that distinguishes this asynchronous write 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.

Return Value

Type: IAsyncResult
An IAsyncResult that represents the asynchronous call.

Remarks

Pass the returned IAsyncResult to EndWrite(IAsyncResult) to get any exceptions that occurred during the asynchronous write or to wait for the write to complete.

Digital waveform writes are not affected by the SampleInterval or StartTime properties on the DigitalWaveform. To configure timing for digital waveform writes, use the ConfigureSampleClock 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.

This method returns immediately if the output buffer has sufficient space for the samples. Otherwise, the call is blocked until the application generates enough samples to fit the new data into the output buffer.

Note Note
Refer to Asynchronous Reads and Writes for additional information.

See Also

Log in to get a better experience