Table of Contents

Class AnalogOutput

Namespace
Bonsai.DAQmx
Assembly
Bonsai.DAQmx.dll

Represents an operator that generates voltage signals in one or more DAQmx analog output channels from a sequence of sample buffers.

AnalogOutput configures and starts a task for generating voltage signals in one or more physical analog output channels. Voltage samples for each channel are read from sample buffers in the source sequence, where each row corresponds to one of the channels in the signal generation task, and each column to a sample from each of the channels. The order of the channels follows the order in which you specify the channels in the Channels property.

Signals can be generated continuously, where a ring buffer is constanty updated with new data arriving from the source sequence.

AnalogOutput-Continuous

Alternatively, signals can also be generated with a finite number of samples, in which case the input buffers will provide samples until the specified buffer size is reached. In this case, the operator will wait for the task to finish generating the specified number of samples.

AnalogOutput-Finite

public class AnalogOutput : Sink<Mat>
Inheritance
AnalogOutput
Inherited Members

Properties

ActiveEdge

Gets or sets a value specifying on which edge of a clock pulse sampling takes place.

public SampleClockActiveEdge ActiveEdge { get; set; }

Property Value

SampleClockActiveEdge

BufferSize

Gets or sets the number of samples to generate, for finite samples, or the size of the buffer for continuous signal generation.

public int BufferSize { get; set; }

Property Value

int

Channels

Gets the collection of analog output channels used to generate voltage signals.

public Collection<AnalogOutputChannelConfiguration> Channels { get; }

Property Value

Collection<AnalogOutputChannelConfiguration>

SampleMode

Gets or sets a value specifying whether the signal generation task will generate a finite number of samples or if it continuously generates samples.

public SampleQuantityMode SampleMode { get; set; }

Property Value

SampleQuantityMode

SampleRate

Gets or sets the sampling rate for generating voltage signals, in samples per second.

public double SampleRate { get; set; }

Property Value

double

SignalSource

Gets or sets the optional source terminal of the clock. If not specified, the internal clock of the device will be used.

public string SignalSource { get; set; }

Property Value

string

Methods

Process(IObservable<Mat>)

Generates voltage signals in one or more DAQmx analog output channels from an observable sequence of sample buffers.

public override IObservable<Mat> Process(IObservable<Mat> source)

Parameters

source IObservable<Mat>

A sequence of 2D Mat objects storing the voltage samples. Each row corresponds to one of the channels in the signal generation task, and each column to a sample from each of the channels. The order of the channels follows the order in which you specify the channels in the Channels property.

Returns

IObservable<Mat>

An observable sequence that is identical to the source sequence but where there is an additional side effect of generating voltage signals in one or more DAQmx analog output channels.

Process(IObservable<double>)

Generates a voltage signal in one or more DAQmx analog output channels from an observable sequence of samples.

public IObservable<double> Process(IObservable<double> source)

Parameters

source IObservable<double>

A sequence of floating-point numbers representing the samples used to generate voltage signals.

Returns

IObservable<double>

An observable sequence that is identical to the source sequence but where there is an additional side effect of generating voltage signals in one or more DAQmx analog output channels.