NI-DAQmx .NET Framework 4.0 API Reference

DigitalMultiChannelWriter.WriteSingleSampleSingleLine Method

  • Updated2023-02-21
  • 1 minute(s) read
DigitalMultiChannelWriter.WriteSingleSampleSingleLine Method
Writes a single Boolean sample to one or more DOChannel objects in a task.

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

Syntax

public void WriteSingleSampleSingleLine(
	bool autoStart,
	bool[] data
)
Public Sub WriteSingleSampleSingleLine ( 
	autoStart As Boolean,
	data As Boolean()
)

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: SystemBoolean
A 1D array of Boolean samples to write to the task. Each element of the array corresponds to a channel within the task. The order of the channels in the array correspond 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

This method fails if the channels in the task contain more than one digital line.

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.

See Also