Data Acquisition Toolbox
  Function/Property:
    Search    Help Desk 

Basic Setup Properties

For most data acquisition applications, there is a set of properties used to configure the basic setup for your session. These properties provide access to individual channels and control the sampling rate, triggers, and the number of samples to acquire per trigger. Properties related to the basic setup are given below.

Table 3-2: Analog Input Basic Setup Properties
Property
Description
Channel
Contains all the channels associated with the device object as created with addchannel
SamplesPerTrigger
Specifies the number of samples to acquire per channel for each trigger issued
SampleRate
Specifies the samples per second of the analog input hardware device
TriggerType
Specifies the type of trigger to be issued

Accessing Individual Channels

As discussed in "Property Names and Property Values", the Data Acquisition Toolbox supports two basic types of properties for analog input objects: common properties and channel properties. Common properties apply to all channels contained by the device object while channel properties can be configured for individual channels.

Channel contains all the channels associated with an analog input object as created with addchannel. Using Channel, you can:

Using Channel to configure channel properties is illustrated in "Data Range and Engineering Units Properties".

Setting the Sampling Rate

The per-channel rate at which data is acquired is controlled with the SampleRate property. SampleRate must be specified as samples per second. For example, to set the sampling rate of your sound card to 44,100 samples per second (44.1 kHz)

Data acquisition boards typically have predefined sampling rates that can be set. If you specify a sampling rate that does not match one of these predefined values but is within the range of valid values, then the toolbox automatically selects a valid sampling rate. If you specify a sampling rate that is outside the range of valid values, then an error is returned. The rules applied by the toolbox to select a valid sampling rate are described in Chapter 7, "Property Reference."

After setting a value for SampleRate, you should find out the actual rate set by the hardware driver.

The default value for SampleRate is 8 kHz for most sound cards. For other hardware devices, the default value is supplied by the hardware driver.

Defining a Trigger

For analog input objects, a trigger is defined as an event that initiates data logging to memory and/or a disk file.

The TriggerType property specifies the type of trigger to be issued. The valid TriggerType values that are supported for all hardware devices are given below.

Table 3-3: TriggerType Values  
Value
Description
{Immediate}
The trigger occurs just after the start command is issued. This is the default trigger type.

Manual
The trigger occurs just after you manually issue the
trigger function.
Software
You must specify one or more channels as trigger sources. The trigger is issued when a signal satisfying the specified condition is detected on one of those channels.

For some hardware, additional trigger types are available. The value of TriggerType determines whether additional trigger properties must be set.

Triggering can be a complicated issue and it has many associated properties. For detailed information about triggering, refer to "Configuring Triggers".

Setting the Samples to Acquire per Trigger

When a trigger executes, the number of samples to be acquired per trigger specified is acquired for each channel group member and stored in the data acquisition engine and/or written to a log file. The number of samples to acquire per trigger is configured with the SamplesPerTrigger property.

The default value of SamplesPerTrigger is calculated by the engine such that one second of data is collected, and is based on the value of SampleRate. In general, to calculate the acquisition time for each trigger issued, you apply the formula



[ Previous | Help Desk | Next ]