Data Acquisition Toolbox | ![]() ![]() |
Retrieving Logged Information
You retrieve logged information with the daqread
function. You can retrieve any part of the information stored in a log file with one call to daqread
. However, you will probably use daqread
in one of these two ways:
Retrieving Data and Time Information
You can characterize logged data by the sample number or the time the sample was acquired. To retrieve data and time information, you use the syntax shown below:
data
is the retrieved data. Data is returned as an m-by-n matrix where m is the number of samples and n is the number of channels.
time
(optional) is the relative time associated with the retrieved data. Time is returned as an m-by-1 matrix where m is the number of samples.
abstime
(optional) is the absolute time of the first trigger. Absolute time is returned as a clock
vector.
file
is the name of the log file.
'P1',V2,'P2',V2
,...(optional) are the property name/property value pairs, which allow you to select the amount of data to retrieve, among other things (see below).
daqread
returns data and time information in the same format as getdata
. If data from multiple triggers is retrieved, each trigger is separated by a NaN
.
You select the amount of data returned and the format of that data with the properties given below.
The Samples
, Time
, and Triggers
properties are mutually exclusive. If none of these three properties is specified, then all the data is returned.
Retrieving Event, Device Object, Channel, and Hardware Information
You can retrieve event, device object, channel, and hardware information, along with data and time information, using the syntax shown below.
events
is a structure containing event information associated with the logged data. The events retrieved depend on the value of the Samples
, Time
, or Triggers
property. At a minimum, the trigger event associated with the selected data is returned. The entire event log is returned to events
only if Samples
, Time
, or Triggers
is not specified.
daqinfo
is a structure that stores device object, channel, and hardware information in two fields: ObjInfo
and HwInfo
. ObjInfo
is a structure containing property values for the device object and any channels it contains. The property values are returned in the same format as returned by get
. HwInfo
is a structure containing hardware information. The hardware information is identical to the information returned by daqhwinfo(obj)
.
Alternatively, you can return only object, channel, and hardware information with the command
Note
When you retrieve object information, the entire event log is returned to daqinfo.ObjInfo.EventLog regardless of the number of samples retrieved.
|
![]() | Specifying a Filename | Example: Logging and Retrieving Information | ![]() |