Main Content

preload

Queue scan data for device output

Since R2020a

Description

example

preload(d,scanData) provides scan data to the DataAcquisition interface d for device output.

You queue data before calling start on your DataAcquisition. Calling start runs the DataAcquisition in the background, without blocking MATLAB®.

Examples

collapse all

Queue scan data to the DataAcquisition interface in preparation for device output.

Define and queue a sine wave for output of one cycle on a single channel.

scanData = sin(linspace(0,2*pi,5000)');
preload(d,scanData)
% ⋮
start(d)

Define and queue a sine wave for repeated output on a single channel.

scanData = sin(linspace(0,2*pi,5000)');
preload(d,scanData)
% ⋮
start(d,"RepeatOutput")
% ⋮
stop(d)

Input Arguments

collapse all

DataAcquisition interface, specified as a DataAcquisition object, created using the daq function.

Example: d = daq(...)

Scan data for device output, specified as an M-by-N matrix, where M is the number of data scans and N is the number of output channels in the DataAcquisition interface. For a single channel, the data is a column vector.

Data Types: double

Version History

Introduced in R2020a

See Also

Functions