read
Syntax
Description
reads
a single input scan from all input channels on the DataAcquisition, and returns a timetable
to scanData
= read(d
)scanData
.
reads a span of input scans from the DataAcquisition interface, and returns a timetable to
scanData
= read(d
,span
)scanData
. You can specify span
as a duration, a
number of scans, or "all"
.
If the DataAcquisition is not running and has no acquired data, the DataAcquisition starts a foreground finite acquisition to read the requested number of scans. MATLAB is blocked until the acquisition and read are complete.
If the DataAcquisition is running when you call this function, it reads data already acquired, if necessary waiting until the specified number of scans are available. MATLAB is blocked until the acquisition and read are complete. This is typical when
start
is called to run a background acquisition prior to callingread
.If the DataAcquisition is not running but has acquired data from a previous run, it reads the specified number of scans or all the data, whichever is less.
[
performs the specified read, and returns a timetable to scanData
,triggerTime
] = read(___)scanData
and scan
trigger time to triggerTime
as a datetime.
performs the specified read, and returns an M-by-N matrix of doubles to
scanData
= read(___,"OutputFormat","Matrix")scanData
, where M is the number of scans and N is the number of input
channels. Each column contains the data from one channel.
[
performs the specified read and returns the scan timestamps to scanData
,timeStamp
,triggerTime
] = read(___,"OutputFormat","Matrix")timeStamp
,
as an M-by-1 vector of doubles representing the relative time in seconds after the first
scan. The rows of the timeStamp
vector correspond to the rows of the
scanData
matrix. The scan trigger time is returned to
triggerTime
as a datenum double.
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2020a