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.
Note
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, call the
startfunction before calling thewritefunction. The inputs to thestartfunction determine if the generation is finite, repeating, or continuous. Continuous output requireswriteto provide data for as long as output is needed. Multiple calls towritemight be necessary. Background acquisition does not block interaction with MATLAB.
If you queue data for output using the preload
function, calling the start function starts background generation.
If start uses the finite or continuous option, queued data is sent
to the output channels once. You must then call write to continue
providing data for generation. If start uses the repeating option,
you do not need to call write for continued data generation.
Examples
Input Arguments
Version History
Introduced in R2020a