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:

where

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.

Table 8-2: daqread Properties
Property Name
Description
Samples
Specify the sample range.
Time
Specify the relative time range.
Triggers
Specify the trigger range.
Channels
Specify the channel range. Channel names can be specified as a cell array.
DataFormat
Specify the data format as doubles or native.
TimeFormat
Specify the time format as vector or matrix.

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


  Specifying a Filename Example: Logging and Retrieving Information