Evaluate Analog Input Object Status

Status Properties

The properties associated with the status of your AI object allow you to evaluate

  • If the device object is running

  • If data is being logged to the engine or to a disk file

  • How much data has been acquired

  • How much data is available to be extracted from the engine

The analog input status properties are given below.

Analog Input Status Properties

Property Name

Description

Logging

Indicate if data is being logged to memory or to a disk file.

Running

Indicate if the device object is running.

SamplesAcquired

Indicate the number of samples acquired per channel.

SamplesAvailable

Indicate the number of samples available per channel in the data acquisition engine.

When you issue the start function, Running is automatically set to On. When the trigger executes, Logging is automatically set to On and SamplesAcquired keeps a running count of the total number of samples per channel that have been logged to the engine or a disk file. SamplesAvailable tells you how many samples per channel are available to be extracted from the engine with the getdata function.

When the requested number of samples is acquired, SamplesAcquired reflects this number, and both Running and Logging are automatically set to Off. When you extract all the samples from the engine, SamplesAvailable is 0.

Display Summary

You can invoke the display summary by typing an AI object or a channel object at the MATLAB® Command Window, or by excluding the semicolon when

  • Creating an AI object

  • Adding channels

  • Configuring property values using the dot notation

You can also display summary information via the Workspace browser by right-clicking a device object and selecting Explore > Display Summary from the context menu.

The displayed information reflects many of the basic setup properties described in Configure Analog Input Properties, and is designed so you can quickly evaluate the status of your data acquisition session. The display is divided into two main sections: general information and channel information.

General Summary Information

The general display summary includes the device object type and the hardware device name, followed by this information:

  • Acquisition parameters

    • The sampling rate

    • The number of samples to acquire per trigger

    • The acquisition duration for each trigger

    • The destination for logged data

  • Trigger parameters

    • The trigger type

    • The number of triggers, including the number of triggers already executed

  • The engine status

    • Whether the engine is logging data, waiting to start, or waiting to trigger

    • The number of samples acquired since starting

    • The number of samples available to be extracted with getdata

Channel Summary Information

The channel display summary includes property values associated with

  • The hardware channel mapping

  • The channel name

  • The engineering units

The display summary for the example given in Acquire Data with a Sound Card before start is issued is shown below.

You can use the Channel property to display only the channel summary information.

AI.Channel
Was this topic helpful?