readwrite
R2026bSimultaneously read and write device channel data
Syntax
Description
writes inScanData = readwrite(d,outScanData)outScanData to the output channels of the device corresponding to
DataAcquisition object d and simultaneously returns
the data read from the input channels. The returned data inScanData is a
timetable with the same number of rows as outScanData.
[
also returns the scan trigger time as a datetime.inScanData,triggerTime] = readwrite(d,outScanData)
sets the format of the returned data as a matrix or a timetable. The default format is
timetable.inScanData = readwrite(d,outScanData,OutputFormat=format)
[
returns the scan data, timestamps, and trigger time as a matrix. The function returns
timestamps as the second output argument only if the inScanData,timeStamp,triggerTime] = readwrite(___,OutputFormat="Matrix")OutputFormat is
"Matrix".
Note
The readwrite function supports only foreground clocked
operations, which reset counter inputs and block MATLAB until the read and write
operations are complete.
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2020a