write
R2026bWrite output scans to hardware channels
Syntax
Description
write( writes
data from each column of the d,scanData)scanData matrix to the corresponding device
output channels on the DataAcquisition object d.
The write operation can occur synchronously (in the foreground) or asynchronously (in the background).
Foreground generation (synchronous write) — To initiate foreground data generation, call the
writefunction. This action generates data while blocking interaction with MATLAB® until the write operation completes.Background generation (asynchronous write) — To initiate background data generation without blocking interaction with MATLAB, call the
startfunction before callingwrite. The inputs tostartdetermine whether generation is finite, repeating, or continuous.Continuous background generation requires write to supply data for as long as output is needed.
If you queue data using
preload, callingstartbegins background generation. For finite or continuous generation, the queued data is output once, after which you must callwriteto provide additional data.If you use
startwith"RepeatOutput"option, the queued data repeats automatically, so additional calls towriteare not required.
Examples
Input Arguments
Version History
Introduced in R2020a